http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60531

            Bug ID: 60531
           Summary: template function not resolved when comparing
                    functions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: harald at gigawatt dot nl

template <typename T> void f();
int main() { f<int> == f<int>; }

is rejected with

test.cc: In function ‘int main()’:
test.cc:2:24: error: invalid operands of types ‘<unresolved overloaded function
type>’ and ‘<unresolved overloaded function type>’ to binary ‘operator==’
 int main() { f<int> == f<int>; }

I see no reason why this would be invalid, and it is accepted by all other
compilers I was able to test (clang, Intel, Sun, MSVC), but it is rejected by
GCC at least as far back as 4.3.

Reply via email to