set

Synopsis

template <class Name, class F>
struct set
  // unspecified
;

Description

Template expression that can be used inside a do block. F is a nullary metafunction returning a monadic value. set binds the result of F to Name in the rest of the do block. On how the binding works, see let.

#include <mpllibs/metamonad/do.hpp>

Example

using boost::mpl::int_;
using namespace mpllibs::metamonad::name;

do_<exception_tag>::apply<
  set<r, may_fail1<int_<13>>,
  may_fail2<r>
>

[up]