This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/12183] defunctional operator lookup in templates within namespaces


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12183


rschiele at uni-mannheim dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
          Component|c++                         |libstdc++
         Resolution|INVALID                     |


------- Additional Comments From rschiele at uni-mannheim dot de  2003-09-05 15:26 -------
Ok, got the argument. 
 
But that means that I cannot use std::less with a class type I have defined an 
operator< for when I include iterator stuff because the ISO standard section 
24.4.1.3.13 requires that operator< is provided in namespace std, right? 
 
This means that the following program can never compile unless you remove the 
include for the iterator stuff, right? 
 
#include <functional> 
#include <iterator> 
 
class a; 
bool operator<(a&,a&); 
 
void g(a& f) { 
    f < f;          // ok 
    std::less<a> l; 
    l(f, f);        // error: no match for 'operator<' in 'x < y' 
} 
 
Is this a flaw in the standard or has anyone an idea how to fix this in 
libstdc++ implementation of std::less?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]