This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80637] New: [concepts] incorrect ambiguous overload
- From: "ryan.burn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 May 2017 00:55:14 +0000
- Subject: [Bug c++/80637] New: [concepts] incorrect ambiguous overload
- Auto-submitted: auto-generated
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