1// PR c++/42266
2// { dg-options -std=c++0x }
3
4template<typename... _Elements>
5  class tuple;
6
7template<typename _Arg>
8  class _Mu;
9
10template<typename _Signature>
11  struct _Bind;
12
13template<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
22template<typename _Functor, typename _Arg>
23  _Bind<_Functor(_Arg)>
24  bind(_Functor, _Arg) { }
25
26struct State
27{
28  bool ready() { return true; }
29
30  void f()
31  {
32    bind(&State::ready, this);
33  }
34};
35
36