https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67499

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #5)

> /usr/include/c++/4.8/ostream:548:5: note: template<class _Traits>
> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char,
> _Traits>&, const unsigned char*)
>      operator<<(basic_ostream<char, _Traits>& __out, const unsigned char*
> __s)
>      ^
> /usr/include/c++/4.8/ostream:548:5: note:   template argument
> deduction/substitution failed: cannot convert type ‘foo’ to type ‘const
> unsigned char*’

I am against removing information, most of it is useful in some cases. You can
organize things better, have some overridable limits, etc, but in a number of
cases g++ is actually printing too little information, not too much. We need to
make the wall of text easier to understand / navigate, not remove information
from it. In the example above, you dropped the information that it is 'bar'
(the second argument) that cannot be converted, which, for a function with more
arguments and templates and typedefs all over the place, might not be obvious
at all.

If we were outputting html, it would be much easier, we could print the error
message and have javascript so that clicking in appropriate places displays the
candidates, the reason for substitution failure, what a type is an alias for,
etc. This is something IDEs could do. But with text, we have to print
everything that might be useful.

Reply via email to