OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic97.C] - Rev 301

Go to most recent revision | Compare with Previous | Blame | View Log

// 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);
  }
};

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.