gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C
raw| 1 | // PR c++/68683 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template <typename, typename> |
| 5 | struct is_same { |
| 6 | static constexpr bool value = true; |
| 7 | }; |
| 8 | |
| 9 | template <typename T, typename U> |
| 10 | concept Same = is_same<T, U>::value; |
| 11 | |
| 12 | template <typename T> |
| 13 | concept Integral = requires { |
| 14 | { T () } -> Same<typename T::value_type>; |
| 15 | }; |
| 16 | |
| 17 | struct A { |
| 18 | using value_type = bool; |
| 19 | }; |
| 20 | |
| 21 | int main () { |
| 22 | Integral<A>; |
| 23 | Integral<A>; |
| 24 | return 0; |
| 25 | } |