https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68842
Bug ID: 68842 Summary: Better error output when template needed before dependent name Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: davejohansen at gmail dot com Target Milestone: --- Created attachment 36985 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36985&action=edit Example code to demonstrate error Currently, when a dependent name cannot be correctly resolved and the template keyword is required, the error output is: test_template.cc: In instantiation of ‘void do_test() [with int N = 2]’: test_template.cc:20:14: required from here test_template.cc:15:15: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’ t.do_nothing<N>(0); The output is a correct representation of how the compiler is interpreting the code, but it is not helpful to a developer that doesn't understand the intricacies of templates and dependent name resolution. It would be nice if a more meaningful error output was given with at least a hint about the possible need for the template keyword.