https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79682
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.0
Blocks| |67491
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
With this updated testcase using C++2a syntax:
template <unsigned N>
requires ((N & 0x1) != 0) && (N > 1)
int foo() { return 0; }
template <unsigned N>
requires ((N & 0x1) != 0x0)
void foo() { }
int main(void) {
return foo<0x03>();
}
Current trunk prints:
b.cc: In function 'int main()':
b.cc:10:20: error: call of overloaded 'foo<3>()' is ambiguous
10 | return foo<0x03>();
| ^
b.cc:3:5: note: candidate: 'int foo() [with unsigned int N = 3]'
3 | int foo() { return 0; }
| ^~~
b.cc:7:6: note: candidate: 'void foo() [with unsigned int N = 3]'
7 | void foo() { }
| ^~~
So it seems to be fixed. We might want to add the testcase to the testsuite
before closing the bug though.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues