blob: b5ec2c92585b2595dbec39a7c86bbc07a82b4219 [file] [log] [blame]
// PR c++/99501
// { dg-do compile { target c++20 } }
template<auto> struct X;
template<auto V> requires requires{V.a;} struct X<V>;
template<auto V> requires requires{V.b;} struct X<V>;
template<auto V> requires requires{V.a;} struct X<V> { static const bool v = false; };
template<auto V> requires requires{V.b;} struct X<V> { static const bool v = true; };
struct A { int a; };
static_assert(!X<A{}>::v);
struct B { int b; };
static_assert(X<B{}>::v);