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

            Bug ID: 95262
           Summary: Taking address of function pointer do full concept
                    overload resolution
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Reduced from StackOverflow (https://stackoverflow.com/q/61941173/2069064):

template <typename> int f() { return 0; }
template <typename> requires true int f() { return 1; }

int (*p)() = &f<int>;

gcc complains that converting the function is ambiguous even though the second
overload is a better candidate than the first. clang accepts.

Reply via email to