already_lazy

Synopsis

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

Description

Exp is an angly bracket expression of metafunctions calling each other with other angly bracket expressions as arguments. When already_lazy is used inside lazy, the content of already_lazy is not transformed by lazy. When it is used outside of lazy, it does not change the meaning of the wrapped expression.

#include <mpllibs/metamonad/already_lazy.hpp>

Expression semantics

For any c class the following are equivalent

lazy<already_lazy<c>>::type
c
already_lazy<c>::type
c::type

Example

using namespace boost::mpl;

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

[up]