This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80637] New: [concepts] incorrect ambiguous overload


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

            Bug ID: 80637
           Summary: [concepts] incorrect ambiguous overload
           Product: gcc
           Version: c++-concepts
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

This code won't compile with GCC

/////////////////////////////////////////////////////
template <class T>
struct A {
  void f() 
    requires std::is_same_v<T, int>
  {
  }

  void f(int) 
    requires !std::is_same_v<T, int>
  {
  }
};

int main() {
  auto fptr = &A<int>::f;
  return 0;
}
/////////////////////////////////////////////////////

According to the discussion here, it should be valid:

http://stackoverflow.com/q/43793941/4447365

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]