Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/variadic1.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++/66712 | |
2 // { dg-options "-std=c++17 -fconcepts" } | |
3 | |
4 template <class T, class...Args> | |
5 concept bool _Constructible_ = | |
6 requires (Args&&...args) | |
7 { | |
8 T{ ((Args&&)(args))... }; | |
9 }; | |
10 | |
11 template <class T, class...Args> | |
12 constexpr bool _constructible_() { return false; } | |
13 | |
14 _Constructible_{T, ...Args} | |
15 constexpr bool _constructible_() { return true; } | |
16 | |
17 struct S | |
18 { | |
19 S(int, char const *); | |
20 }; | |
21 | |
22 int main() | |
23 { | |
24 static_assert(_constructible_<S, int, char const *>(), ""); | |
25 } |