[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] Scope resolution problems with NAMESPACES on g++ 4.6.2
From:       Ádám Juhász <jadam1212 () gmail ! com>
Date:       2012-06-08 23:27:29
Message-ID: CABjEFnVmfsNAGtJRZk9yVLU_D7W-ww=vN2UA_yp5QLz2LrC8Jg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I have a guess, not sure though that it will work:

in the header try modifying


class TimeStamp
{

public:
    // Default constructor.
    TimeStamp() throw();

    // Destructor.
    ~TimeStamp() throw();

    // Copy constructor.
    TimeStamp(const TimeStamp& rhs) throw();

    // ( HERE IS WHERE THE SCOPE PROBLEM HAPPENS IN 4.6.2 but not in
    // 3.4.5)
    // Equality operator.
   * friend bool operator==(const TimeStamp& a, const TimeStamp& b) throw();
*
to
   * friend bool AppGlobal::operator==(const TimeStamp& a, const TimeStamp&
b) throw();*

Sincerely,
Adam.

2012/6/9 Rom Albuquerque <a_romolo@hotmail.com>

>
>
>
> Thanks for the input. However, The problem persists.
>
> --Rom
>
>
> ----------------------------------------
> > Date: Fri, 8 Jun 2012 16:19:56 -0400
> > From: earnie@users.sourceforge.net
> > To: mingw-users@lists.sourceforge.net
> > Subject: Re: [Mingw-users] Scope resolution problems with NAMESPACES on
> g++ 4.6.2
> >
> > On Fri, Jun 8, 2012 at 2:36 PM, Rom Albuquerque wrote:
> > >  Hi folks, I've upgraded my g++ version from 3.4.5 to 4.6.2 and now
> > >  code that was building just fine with 3.4.5. no longer builds with
> > >  4.6.2. In particularly, a scope resolution problem related to
> > >  friend functions when the class it is a friend of is actually defined
> > >  inside a namespace. This is the main case that is causing the build
> > >  to fail at this point. The sample sources include below reproduce
> > >  this problem quite well.
> > >
> > >  Any input is welcome. Your response is greatly appreciated.
> >
> > Just a guess. I assume you need to move the ``using namespace std''
> > or add it additionally within the AppGlobal namespace. I don't C++
> > that often so this message could be meaningless.
> >
> > --
> > Earnie
> > -- https://sites.google.com/site/earnieboyd
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > MinGW-users mailing list
> > MinGW-users@lists.sourceforge.net
> >
> > This list observes the Etiquette found at
> > http://www.mingw.org/Mailing_Lists.
> > We ask that you be polite and do the same. Disregard for the list
> etiquette may cause your account to be moderated.
> >
> > _______________________________________________
> > You may change your MinGW Account Options or unsubscribe at:
> > https://lists.sourceforge.net/lists/listinfo/mingw-users
> > Also: mailto:mingw-users-request@lists.sourceforge.net
> ?subject=unsubscribe
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@lists.sourceforge.net
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list
> etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe
>



-- 

*Juhász Ádám*

jadam1212@gmail.com
0036-30-2614731

[Attachment #5 (text/html)]

Hi,<br><br>I have a guess, not sure though that it will work:<br><br>in the header \
try modifying<br><br><br>class TimeStamp<br> {   <br>
   <br>
public:<br>
    // Default constructor.<br>
    TimeStamp() throw();<br>
<br>
    // Destructor.<br>
    ~TimeStamp() throw();<br>
<br>
    // Copy constructor.<br>
    TimeStamp(const TimeStamp&amp; rhs) throw();<br>
<br>
    // ( HERE IS WHERE THE SCOPE PROBLEM HAPPENS IN 4.6.2 but not in<br>
    // 3.4.5)<br>
    // Equality operator.<br>
   <b> friend bool operator==(const TimeStamp&amp; a, const TimeStamp&amp; b) \
throw();</b><br>to<br>   <b> friend bool AppGlobal::operator==(const TimeStamp&amp; \
a, const TimeStamp&amp; b) throw();</b><br><br>Sincerely,<br> Adam.<br><br><div \
class="gmail_quote">2012/6/9 Rom Albuquerque <span dir="ltr">&lt;<a \
href="mailto:a_romolo@hotmail.com" \
target="_blank">a_romolo@hotmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
<br>
<br>
Thanks for the input. However, The problem persists.<br>
<br>
--Rom<br>
<br>
<br>
----------------------------------------<br>
&gt; Date: Fri, 8 Jun 2012 16:19:56 -0400<br>
&gt; From: <a href="mailto:earnie@users.sourceforge.net">earnie@users.sourceforge.net</a><br>
 &gt; To: <a href="mailto:mingw-users@lists.sourceforge.net">mingw-users@lists.sourceforge.net</a><br>
 &gt; Subject: Re: [Mingw-users] Scope resolution problems with NAMESPACES on g++ \
4.6.2<br> <div class="HOEnZb"><div class="h5">&gt;<br>
&gt; On Fri, Jun 8, 2012 at 2:36 PM, Rom Albuquerque wrote:<br>
&gt; &gt;  Hi folks, I&#39;ve upgraded my g++ version from 3.4.5 to 4.6.2 and now<br>
&gt; &gt;  code that was building just fine with 3.4.5. no longer builds with<br>
&gt; &gt;  4.6.2. In particularly, a scope resolution problem related to<br>
&gt; &gt;  friend functions when the class it is a friend of is actually defined<br>
&gt; &gt;  inside a namespace. This is the main case that is causing the build<br>
&gt; &gt;  to fail at this point. The sample sources include below reproduce<br>
&gt; &gt;  this problem quite well.<br>
&gt; &gt;<br>
&gt; &gt;  Any input is welcome. Your response is greatly appreciated.<br>
&gt;<br>
&gt; Just a guess. I assume you need to move the ``using namespace std&#39;&#39;<br>
&gt; or add it additionally within the AppGlobal namespace. I don&#39;t C++<br>
&gt; that often so this message could be meaningless.<br>
&gt;<br>
&gt; --<br>
&gt; Earnie<br>
&gt; -- <a href="https://sites.google.com/site/earnieboyd" \
target="_blank">https://sites.google.com/site/earnieboyd</a><br> &gt;<br>
&gt; ------------------------------------------------------------------------------<br>
 &gt; Live Security Virtual Conference<br>
&gt; Exclusive live event will cover all the ways today&#39;s security and<br>
&gt; threat landscape has changed and how IT managers can respond. Discussions<br>
&gt; will include endpoint security, mobile security and the latest in malware<br>
&gt; threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" \
target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br> \
&gt; _______________________________________________<br> &gt; MinGW-users mailing \
list<br> &gt; <a href="mailto:MinGW-users@lists.sourceforge.net">MinGW-users@lists.sourceforge.net</a><br>
 &gt;<br>
&gt; This list observes the Etiquette found at<br>
&gt; <a href="http://www.mingw.org/Mailing_Lists" \
target="_blank">http://www.mingw.org/Mailing_Lists</a>.<br> &gt; We ask that you be \
polite and do the same. Disregard for the list etiquette may cause your account to be \
moderated.<br> &gt;<br>
&gt; _______________________________________________<br>
&gt; You may change your MinGW Account Options or unsubscribe at:<br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/mingw-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/mingw-users</a><br> &gt; \
Also: mailto:<a href="mailto:mingw-users-request@lists.sourceforge.net">mingw-users-request@lists.sourceforge.net</a>?subject=unsubscribe<br>
 <br>
------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today&#39;s security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" \
target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br> \
_______________________________________________<br> MinGW-users mailing list<br>
<a href="mailto:MinGW-users@lists.sourceforge.net">MinGW-users@lists.sourceforge.net</a><br>
 <br>
This list observes the Etiquette found at<br>
<a href="http://www.mingw.org/Mailing_Lists" \
target="_blank">http://www.mingw.org/Mailing_Lists</a>.<br> We ask that you be polite \
and do the same.  Disregard for the list etiquette may cause your account to be \
moderated.<br> <br>
_______________________________________________<br>
You may change your MinGW Account Options or unsubscribe at:<br>
<a href="https://lists.sourceforge.net/lists/listinfo/mingw-users" \
                target="_blank">https://lists.sourceforge.net/lists/listinfo/mingw-users</a><br>
                
Also: mailto:<a href="mailto:mingw-users-request@lists.sourceforge.net">mingw-users-request@lists.sourceforge.net</a>?subject=unsubscribe<br>
 </div></div></blockquote></div><br><br clear="all"><br>-- \
<br><div><br></div><div><b>Juhász Ádám</b><br></div><div><br></div><div><a \
href="mailto:jadam1212@gmail.com" \
target="_blank">jadam1212@gmail.com</a></div><div>0036-30-2614731</div> <br>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic