c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / concepts-requires31.C
blobcd26b9ca07771016d24154e32764a112a34821e6
1 // PR c++/107179
2 // { dg-do compile { target c++20 } }
4 template<bool B> struct bool_constant { static constexpr bool value = B; };
6 template<typename T>
7   struct is_implicitly_default_constructible
8   : bool_constant<requires { T(); }>
9   { };
11 struct X { private: X(); };
12 struct Y { };
14 static_assert( !is_implicitly_default_constructible<X>::value );
15 static_assert(  is_implicitly_default_constructible<Y>::value );