Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/req8.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // { dg-do compile } | |
2 // { dg-options "-std=c++17 -fconcepts" } | |
3 | |
4 // Check that type requirements are normalized correctly. | |
5 | |
6 template<typename T> | |
7 concept bool Has_member_type() { | |
8 return requires() { typename T::type; }; | |
9 } | |
10 | |
11 template<typename T> | |
12 concept bool Concept() { | |
13 return true && Has_member_type<T>(); | |
14 } | |
15 | |
16 template<Concept T> | |
17 void foo( T t ) { } |