exception

Synopsis

template <class Data>
struct exception
{
  typedef exception_tag tag;

  // unspecified
};

Description

Compile-time data-structure representing an error that occured during the evaluation of template metaprograms. Data is a compile-time data-structure describing the error.

The tag of the values is exception_tag.

#include <mpllibs/metamonad/exception.hpp>

Example

using boost::mpl::equal_to;
using boost::mpl::int_;

struct division_by_zero;

template <class A, class B>
struct divide :
  if_<
    equal_to<A, int_<0>>,
    exception<division_by_zero>,
    divides<A, B>
  >
  {};

[up]