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

            Bug ID: 81059
           Summary: error: assuming cast from overloaded function
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaballo86 at hotmail dot com
  Target Milestone: ---

The following snippet results in a compilation error:

    template <typename T> void fun() {}
    bool c = &fun<int> == fun<int>;

> error: assuming cast to type 'void (*)()' from overloaded function

The following slight variations do not result in errors:

    bool c1 = &fun<int> == &fun<int>;
    bool c2 = &fun<int> == *fun<int>;

Reply via email to