MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
functor.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_FUNCTOR_HPP
13 #define BOOST_MPL11_FUNCTOR_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 Datatype, typename>
25  struct Functor : false_ { };
26 
27  template <typename f, typename structure>
28  struct fmap :
29  Functor<typename datatype<typename structure::type>::type>::
30  template fmap_impl<f, typename structure::type>
31  { };
32 
33 #ifndef BOOST_MPL11_NO_REWRITE_RULES
34  template <typename f, typename g, typename structure>
35  struct fmap<f, fmap<g, structure>>
36  : fmap<compose<f, g>, structure>
37  { };
38 #endif
39 }} // end namespace boost::mpl11
40 
41 #endif // !BOOST_MPL11_FUNCTOR_HPP
Manages configurable options of the library and defines utility macros.
Returns the result of mapping a metafunction class over a Functor.
Definition: functor.hpp:28
Defines the Core module.
Forwards to boost/mpl11/integer.hpp.
Forward declares the Functor typeclass.
Defines the Functional module.