// This file was GENERATED by command:
//     pump.py apply_variadic.h.pump
// DO NOT EDIT BY HAND!!!

#ifndef SAUCE_INTERNAL_APPLY_VARIADIC_H_
#define SAUCE_INTERNAL_APPLY_VARIADIC_H_

namespace sauce {
namespace internal {

template<typename Parameters, typename Signature>
class ApplyFunction;

template<typename Parameters, typename Signature, typename Passed>
typename ApplyFunction<Parameters, Signature>::Return applyFunction(
  typename ApplyFunction<Parameters, Signature>::Function function, Passed passed) {
  return ApplyFunction<Parameters, Signature>(function).apply(passed);
}

template<typename Parameters, typename Signature, typename Passed>
void observeFunction(typename ApplyFunction<Parameters, Signature>::Function function, Passed passed) {
  ApplyFunction<Parameters, Signature>(function).observe(passed);
}

template<typename Parameters, typename Signature>
class ApplyVoidFunction;

template<typename Parameters, typename Signature, typename Passed>
void applyVoidFunction(typename ApplyVoidFunction<Parameters, Signature>::Function function, Passed passed) {
  (ApplyVoidFunction<Parameters, Signature>(function)).apply(passed);
}

template<typename Parameters, typename Signature>
class ApplyMethod;

template<typename Parameters, typename Signature, typename Passed>
typename ApplyMethod<Parameters, Signature>::Return applyMethod(
  typename ApplyMethod<Parameters, Signature>::Receiver & receiver,
  typename ApplyMethod<Parameters, Signature>::Method method, Passed passed) {
  return ApplyMethod<Parameters, Signature>(method).apply(receiver, passed);
}

template<typename Parameters, typename Signature, typename Passed>
void observeMethod(typename ApplyMethod<Parameters, Signature>::Method method, Passed passed) {
  ApplyMethod<Parameters, Signature>(method).observe(passed);
}

template<typename Parameters, typename Constructed_, typename Allocator_>
class ApplyConstructor {
  typedef Constructed_ (Constructor)();
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 0;
  }

  template<typename Passed>
  Constructed * apply(Passed) {
    return new(allocator.allocate(1))Constructed();
  }

  template<typename Passed>
  void observe(Passed) {}
};

template<typename Parameters, typename Constructor, typename Allocator, typename Passed>
typename ApplyConstructor<Parameters, Constructor, Allocator>::Constructed * applyConstructor(Passed passed) {
  return ApplyConstructor<Parameters, Constructor, Allocator>().apply(passed);
}

template<typename Parameters, typename Constructor, typename Allocator, typename Passed>
void observeConstructor(Passed passed) {
  ApplyConstructor<Parameters, Constructor, Allocator>().observe(passed);
}

/* *INDENT-OFF* */
template<typename Parameters, typename Return_>
class ApplyFunction<Parameters, Return_(*)()> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)();
  typedef Return_ (* Function)();

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 0;
  }

  template<typename Passed>
  Return apply(Passed) {
    return function();
  }

  template<typename Passed>
  void observe(Passed) {
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters>
class ApplyVoidFunction<Parameters, void(*)()> {
public:
  typedef void (* Signature)();
  typedef void (* Function)();

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 0;
  }

  template<typename Passed>
  void apply(Passed) {
    function();
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_>
class ApplyMethod<Parameters, Return_(Receiver_::*)()> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)();
  typedef Return_ (Receiver_::* Method)();

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 0;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed) {
    return (receiver.*method)();
  }

  template<typename Passed>
  void observe(Passed) {
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_>
class ApplyConstructor<Parameters, Constructed_(), Allocator_> {
  typedef Constructed_ (Constructor)();
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 0;
  }

  template<typename Passed>
  Constructed * apply(Passed) {
    return new(allocator.allocate(1)) Constructed();
  }

  template<typename Passed>
  void observe(Passed) {
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0>
class ApplyFunction<Parameters, Return_(*)(A0)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 1;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0>
class ApplyVoidFunction<Parameters, void(*)(A0)> {
public:
  typedef void (* Signature)(A0);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 1;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 1;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0>
class ApplyConstructor<Parameters, Constructed_(A0), Allocator_> {
  typedef Constructed_ (Constructor)(A0);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 1;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1>
class ApplyFunction<Parameters, Return_(*)(A0, A1)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 2;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1>
class ApplyVoidFunction<Parameters, void(*)(A0, A1)> {
public:
  typedef void (* Signature)(A0, A1);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 2;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 2;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1>
class ApplyConstructor<Parameters, Constructed_(A0, A1), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 2;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 3;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2)> {
public:
  typedef void (* Signature)(A0, A1, A2);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 3;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 3;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 3;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 4;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 4;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 4;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 4;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 5;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 5;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 5;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 5;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
    typename A5>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 6;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4, A5);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 6;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4, typename A5>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 6;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4, typename A5>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 6;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
    typename A5, typename A6>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 7;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 7;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4, typename A5, typename A6>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 7;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4, typename A5, typename A6>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 7;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
    typename A5, typename A6, typename A7>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 8;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
    typename A6, typename A7>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 8;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4, typename A5, typename A6, typename A7>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 8;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4, typename A5, typename A6, typename A7>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 8;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
    typename A5, typename A6, typename A7, typename A8>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 9;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
    typename A6, typename A7, typename A8>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 9;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4, typename A5, typename A6, typename A7, typename A8>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 9;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7, A8), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 9;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
    typename A5, typename A6, typename A7, typename A8, typename A9>
class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
public:
  typedef Return_ Return;
  typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
  typedef Return_ (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type,
    typename Parameters::template Parameter<A9, 9>::Type);

private:
  Function function;
public:

  ApplyFunction(Function function):
    function(function) {}

  static int arity() {
    return 10;
  }

  template<typename Passed>
  Return apply(Passed passed) {
    return function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
    typename A6, typename A7, typename A8, typename A9>
class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
public:
  typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
  typedef void (* Function)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type,
    typename Parameters::template Parameter<A9, 9>::Type);

private:
  Function function;
public:

  ApplyVoidFunction(Function function):
    function(function) {}

  static int arity() {
    return 10;
  }

  template<typename Passed>
  void apply(Passed passed) {
    function(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
    typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
public:
  typedef Return_ Return;
  typedef Receiver_ Receiver;
  typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
  typedef Return_ (Receiver_::* Method)(
    typename Parameters::template Parameter<A0, 0>::Type,
    typename Parameters::template Parameter<A1, 1>::Type,
    typename Parameters::template Parameter<A2, 2>::Type,
    typename Parameters::template Parameter<A3, 3>::Type,
    typename Parameters::template Parameter<A4, 4>::Type,
    typename Parameters::template Parameter<A5, 5>::Type,
    typename Parameters::template Parameter<A6, 6>::Type,
    typename Parameters::template Parameter<A7, 7>::Type,
    typename Parameters::template Parameter<A8, 8>::Type,
    typename Parameters::template Parameter<A9, 9>::Type);

private:
  Method method;
public:

  ApplyMethod(Method method):
    method(method) {}

  static int arity() {
    return 10;
  }

  template<typename Passed>
  Return apply(Receiver & receiver, Passed passed) {
    return (receiver.*method)(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

/* *INDENT-OFF* */
template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
    typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9), Allocator_> {
  typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
  typedef typename Allocator_::template rebind<Constructed_>::other Allocator;

  Allocator allocator;

public:

  typedef Constructed_ Constructed;

  ApplyConstructor():
    allocator() {}

  static int arity() {
    return 10;
  }

  template<typename Passed>
  Constructed * apply(Passed passed) {
    return new(allocator.allocate(1)) Constructed(
      (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
      (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
  }

  template<typename Passed>
  void observe(Passed passed) {
    (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
    (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
  }
};
/* *INDENT-ON* */

}

namespace i = ::sauce::internal;

}

#endif // SAUCE_INTERNAL_APPLY_VARIADIC_H_
