This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11692] New: vector<A::X<T> > operator== does not find operator== of A::X
- From: "klaus dot kretschel at dlr dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2003 09:20:25 -0000
- Subject: [Bug libstdc++/11692] New: vector<A::X<T> > operator== does not find operator== of A::X
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11692
Summary: vector<A::X<T> > operator== does not find operator== of
A::X
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: klaus dot kretschel at dlr dot de
CC: gcc-bugs at gcc dot gnu dot org
The test program:
#include <vector>
namespace X { template< class T > class A; }
template <class T> class X::A
{
template <typename S>
friend bool operator==(const A<S>& _f1, const A<S>& _f2);
T dummy;
};
template <typename S>
bool operator==(const X::A<S>& _f1, const X::A<S>& _f2) { return false; }
bool test()
{
std::vector <X::A <float> > v1, v2;
return v1 == v2;
}
yields the error message
/usr/include/g++/bits/stl_algobase.h:681: no match for `const X::A<float>& ==
const X::A<float>&' operator
The program compiles if I remove the namespace or replace the vector with
a base datatype. It also compiles with g++ 2.95.
OS: i486-suse-linux