Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates

"Giovanni Bajo" <[email protected]>
Newsgroups gmane.comp.gcc.prs
Message-ID <[email protected]>
The following reply was made to PR c++/10864; it has been noted by GNATS.

From: "Giovanni Bajo" <[email protected]>
To: <[email protected]>,
	<[email protected]>,
	<[email protected]>,
	<[email protected]>,
	<[email protected]>
Cc:  
Subject: Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates
Date: Tue, 20 May 2003 05:06:51 +0200

 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.