blob: a2070319ebd363d3528b93970b60f49ed79b5f46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// PR c++/42266
// { dg-options -std=c++0x }
template<typename... _Elements>
class tuple;
template<typename _Arg>
class _Mu;
template<typename _Signature>
struct _Bind;
template<typename _Functor, typename... _Bound_args>
class _Bind<_Functor(_Bound_args...)>
{
template<typename... _Args, typename
= decltype(_Functor()(_Mu<_Bound_args>()(_Bound_args(),
tuple<_Args...>())...) )>
void __call() { }
};
template<typename _Functor, typename _Arg>
_Bind<_Functor(_Arg)>
bind(_Functor, _Arg) { }
struct State
{
bool ready() { return true; }
void f()
{
bind(&State::ready, this);
}
};
|