This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8277: g++ 3.2 is confused by operators and namespaces
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mathias at valpo dot de, nobody at gcc dot gnu dot org
- Date: 29 Oct 2002 00:11:13 -0000
- Subject: Re: c++/8277: g++ 3.2 is confused by operators and namespaces
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mathias at valpo dot de, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: g++ 3.2 is confused by operators and namespaces
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Mon Oct 28 16:11:11 2002
State-Changed-Why:
The problem reported here can be reduced to the following snippet:
----------------------------------
namespace std
{
template <typename T> struct vector{
T* t;
};
template <typename T> bool operator == (const vector<T> &v1,
const vector<T> &v2)
{return *v1.t == *v2.t; };
};
namespace X {
struct A {
std::vector<A> x ;
};
}
bool operator== ( const X::A& a, const X::A& b )
{
return a.x == b.x ;
}
---------------------------------------
The failure to find the op==(A,A) in std::op==(vector,vector)
is the same problem that has been discussed in length
for c++/8279, see
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8279
Thus, it is not a bug.
Regards
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8277