Closed
Description
https://godbolt.org/z/bvKGhY4Yz
template <int N> concept C0 = (N == 0);
template <int N, int N2> concept C0x = C0<N>;
template <int N1, int N2> concept C00 = C0x<N1, N2> && C0<N2>;
template<int N1, int N2>
struct A {
void f() requires C00<N1, N2>;
void f() requires C0x<N1, N2>;
};
template<int N1, int N2>
void f() requires C00<N1, N2>;
template<int N1, int N2>
void f() requires C0x<N1, N2>;
int main() {
f<0, 0>(); // Works
A<0, 0> a;
a.f(); // Works in GCC only.
}
This should compile, I think, but it doesn't. For some reason MSVC also say that a.f()
is ambiguous.
Metadata
Metadata
Assignees
Type
Projects
Status
Done