[Bug c++/18610] bad error message
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 21 13:10:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18610
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-09-21 12:51:32 UTC ---
(In reply to comment #3)
> Subject: Re: bad error message
>
> "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>
> | I think the fact that we may print a message saying that the overload
> | set is empty but that there are functions of the same name that aren't
> | viable has been discussed in at least one other PR already.
>
> yes, We should implement that functionality, but in 4.1.
>
> -- Gaby
>
Still valid in 4.5.2. Clang gives:
/tmp/webcompile/_30907_0.cc:7:13: warning: class template 'Q' was previously
declared as a struct template [-Wmismatched-tags]
template <> class Q<int>;
^~~~~
struct
/tmp/webcompile/_30907_0.cc:2:8: note: previous use is here
struct Q
^
/tmp/webcompile/_30907_0.cc:17:5: error: no matching function for call to 'g'
g(a );
^
/tmp/webcompile/_30907_0.cc:12:22: note: candidate template ignored:
substitution failure [with T = int]
F< typename Q<T>::t> g( const F<T>& a );
^
1 warning and 1 error generated.
More information about the Gcc-bugs
mailing list