Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/variadic97.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++/42266 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template<typename... _Elements> | |
5 class tuple; | |
6 | |
7 template<typename _Arg> | |
8 class _Mu; | |
9 | |
10 template<typename _Signature> | |
11 struct _Bind; | |
12 | |
13 template<typename _Functor, typename... _Bound_args> | |
14 class _Bind<_Functor(_Bound_args...)> | |
15 { | |
16 template<typename... _Args, typename | |
17 = decltype(_Functor()(_Mu<_Bound_args>()(_Bound_args(), | |
18 tuple<_Args...>())...) )> | |
19 void __call() { } | |
20 }; | |
21 | |
22 template<typename _Functor, typename _Arg> | |
23 _Bind<_Functor(_Arg)> | |
24 bind(_Functor, _Arg) { } | |
25 | |
26 struct State | |
27 { | |
28 bool ready() { return true; } | |
29 | |
30 void f() | |
31 { | |
32 bind(&State::ready, this); | |
33 } | |
34 }; | |
35 |