#define MPLLIBS_TYPECLASS_EXPECT(name) \
// unspecified
Macro for defining a typedef for throwing a compile-time exception. The purpose of the macro is improving readability of typeclass expectation descriptions. The expection thrown is invalid_typeclass
.
#include <mpllibs/metamonad/typeclass.hpp>
The following
MPLLIBS_TYPECLASS_EXPECT(some_fun);
is equivalent to
typedef mpllibs::metamonad::exception<invalid_typeclass> some_fun;
template <class Tag>
struct example_typeclass
{
MPLLIBS_TYPECLASS_EXPECT(some_fun);
MPLLIBS_TYPECLASS_EXPECT(some_other_fun);
};
Copyright Abel Sinkovics (abel at elte dot hu) 2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt