Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/placeholder4.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 // PR c++/66218 | |
2 // { dg-options "-std=c++17 -fconcepts" } | |
3 | |
4 template <class T, class U> | |
5 concept bool Same = __is_same_as(T, U); | |
6 | |
7 template <class T> | |
8 concept bool C = | |
9 requires { | |
10 { 0 } -> Same<T>; | |
11 }; | |
12 | |
13 template <class T> | |
14 struct A { | |
15 template <T t, C c> | |
16 constexpr static bool f() { return true; } | |
17 }; | |
18 | |
19 static_assert(A<int>::f<1,double>(), ""); // { dg-error "" } | |
20 static_assert(A<char>::f<'a',int>(), ""); |