eval_let

Synopsis

template <class Name, class Exp, class Body>
struct eval_let
{
  // unspecified
};

Description

This is similar to let, but it evaluates the substituted expression.

#include <mpllibs/metamonad/eval_let.hpp>

Expression semantics

For any n, x and f classes

eval_let<n, x, f>

is equivalent to

eval_syntax<let<n, x, f>>

Example

using boost::mpl::times;
using boost::mpl::plus;
using boost::mpl::int_;

using namespace mpllibs::metamonad::name;

template <class N>
struct my_metafunction :
  eval_let<
    x, syntax<plus<n, int_<13>>>,
    syntax<times<x, x>>
  >
{};

[up]