Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/expression3.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-options "-std=c++17 -fconcepts" } | |
2 | |
3 template<typename T> | |
4 concept bool C() | |
5 { | |
6 return requires (T& t) { t.~T(); }; | |
7 } | |
8 | |
9 class S1 | |
10 { | |
11 ~S1() { } | |
12 }; | |
13 | |
14 class S2 | |
15 { | |
16 ~S2() = delete; | |
17 }; | |
18 | |
19 int main() | |
20 { | |
21 static_assert(C<S1>(), ""); // { dg-error "failed" } | |
22 static_assert(C<S2>(), ""); // { dg-error "failed" } | |
23 } |