c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates
Giovanni Bajo
giovannibajo@libero.it
Tue May 20 07:39:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10864
For reference:
GCC with StlFilt:
pr10864.cpp: In member function
`bool less<X<vector<string>, vector<string> > >::foo()':
pr10864.cpp:10: instantiated from here
pr10864.cpp:5: error: no match for
`X<vector<string>, vector<string> > < X<vector<string>, vector<string> >'
operator
Comeau:
"pr10864.cpp", line 5: error: no operator "<" matches these operands
operand types are: X<std::vector<std::string,
std::allocator<std::string>>, std::vector<std::string,
std::allocator<std::string>>> <
X<std::vector<std::string,
std::allocator<std::string>>,
std::vector<std::string, std::allocator<std::string>>>
bool foo () { return T() < T(); }
^
detected during instantiation of "bool less<T>::foo() [with
T=X<std::vector<std::string,
std::allocator<std::string>>,
std::vector<std::string, std::allocator<std::string>>>]"
at line 10
Comeau with StlFilt (yes, it screws indentation a little):
pr10864.cpp(5): error: no operator "<" matches these operands
operand types are: X<vector<string>, vector<string>> < X<vector<string>,
vector<string>>
bool foo () { return T() < T(); }
^
detected during instantiation of "bool less<X<vector<string>,
vector<string>>>::foo()" at line 10
Giovanni Bajo
More information about the Gcc-bugs
mailing list