MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
monad.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_MONAD_HPP
13 #define BOOST_MPL11_MONAD_HPP
14 
16 
17 #include <boost/mpl11/bool.hpp>
18 #include <boost/mpl11/core.hpp>
21 
22 
23 namespace boost { namespace mpl11 {
24  template <typename monad>
25  struct join :
26  Monad<typename datatype<typename monad::type>::type>::
27  template join_impl<monad>
28  { };
29 
30  template <typename MonadType, typename x>
31  struct unit
32  : Monad<MonadType>::template unit_impl<x>
33  { };
34 
35  template <>
36  struct instantiate<Monad> {
37  template <typename Datatype>
38  struct with : true_ {
39 #ifndef BOOST_MPL11_NO_ASSERTIONS
40  static_assert(Functor<Datatype>::value, "Monad requires Functor");
41 #endif
42  };
43  };
44 }} // end namespace boost::mpl11
45 
46 #endif // !BOOST_MPL11_MONAD_HPP
Manages configurable options of the library and defines utility macros.
Forward declares the Monad typeclass.
Defines the Core module.
Forwards to boost/mpl11/integer.hpp.
Forward declares the Functor typeclass.