comparison gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/68683
2 // { dg-do compile { target c++2a } }
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 }