lazy_argument

Synopsis

template <class Exp>
struct lazy_argument
{
  // unspecified
};

Description

Exp is an angly bracket expression of metafunctions calling each other with other angly bracket expressions as arguments. already_lazy is expected to be used in the expression passed to lazy. The content of already_lazy is transformed by lazy but is not evaluated.

#include <mpllibs/metamonad/lazy_argument.hpp>

Expression semantics

For any c class

lazy<lazy_argument<c>>::type

is equivalent to

lazy<c>

Example

using namespace boost::mpl;

template <class N>
struct fib :
  lazy<
    eval_if<
      less<N, int_<2>>,
      lazy_argument<int_<1>>,
      lazy_argument<plus<fib<minus<N, int_<1>>>, fib<minus<N, int_<2>>>>
    >
  >
{};

[up]