MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
Namespaces | Classes
Functional

General purpose metafunctions and metafunction classes. More...

Namespaces

 boost::mpl11::functional
 Convenience namespace containing everything provided by the Functional module.
 

Classes

struct  boost::mpl11::always< x >
 Returns a constant metafunction class returning x regardless of the arguments it is invoked with. More...
 
struct  boost::mpl11::flip< f >
 Returns a metafunction class invoking f with its two first arguments in reverse order. More...
 
struct  boost::mpl11::apply< f, x >
 Invokes a metafunction class with the given arguments. More...
 
struct  boost::mpl11::apply_curried< f, xs >
 Invokes a curried metafunction class with the given arguments. More...
 
struct  boost::mpl11::id< x >
 The identity metafunction - returns its argument unchanged. More...
 
struct  boost::mpl11::lift< f >
 Lifts a metafunction. More...
 
struct  boost::mpl11::into< tp >
 Returns a specialization of the given template with the provided arguments. More...
 
struct  boost::mpl11::partial< f, x >
 Returns a partially applied metafunction class. More...
 
struct  boost::mpl11::curry< n, f >
 Returns a curried metafunction class. More...
 
struct  boost::mpl11::uncurry< n, f >
 Returns a uncurried metafunction class. More...
 
struct  boost::mpl11::fix< f >
 Returns a metafunction class computing the least fixed point of f. More...
 
struct  boost::mpl11::compose< f, fs >
 Returns the composition of several metafunction classes. More...
 
struct  boost::mpl11::argmap< f, g >
 Invokes f with the result of mapping g on each argument. More...
 
struct  boost::mpl11::on< f, fs >
 Invokes f with the result of invoking fs... on each corresponding argument. More...
 
struct  boost::mpl11::bind< f, fs >
 Invokes f with the result of invoking each fs... with the arguments. More...
 
struct  boost::mpl11::arg< n >
 Returns the nth of its arguments. More...
 
struct  boost::mpl11::infix< x, f, y >
 Applies a metafunction class in infix notation. More...
 
struct  boost::mpl11::infix_< x, f, y >
 Equivalent to infix<x, lift<f>, y>; provided for convenience. More...
 
struct  boost::mpl11::lsect< x, f >
 Returns the left section of f with x. More...
 
struct  boost::mpl11::lsect_< x, f >
 Equivalent to lsect<x, lift<f>>; provided for convenience. More...
 
struct  boost::mpl11::rsect< f, y >
 Returns the right section of f with y. More...
 
struct  boost::mpl11::rsect_< f, y >
 Equivalent to rsect<lift<f>, y>; provided for convenience. More...
 

Detailed Description

General purpose metafunctions and metafunction classes.

Note
For legibility reasons, apply<f, x1, ..., xn> is sometimes noted as f(x1, ..., xn) in the documentation.
Todo:
  • Consider moving into out of this module. Maybe it would fit better with other utilities manipulating template specializations.
  • Try generalizing rsect and lsect. Not sure it can be done, but here's some brain food:
    rsectn<0, f, x1, ..., xn>::apply<> == f<x1, ..., xn>
    rsectn<1, f, x2, ..., xn>::apply<x1> == f<x1, x2, ..., xn>
    rsectn<2, f, x3, ..., xn>::apply<x1, x2> == f<x1, x2, x3, ..., xn>

It also seems like there may be some kind of operation modifying how functions are applied:

f x1 ... xn // shiftr 0
x1 f x2 ... xn // shiftr 1
x1 x2 f x3 ... xn // shiftr 2
x1 x2 x3 f x4 ... xn // shiftr 3
x1 x2 x3 f x4 ... xn // shiftl 0
x1 x2 f x3 ... xn // shiftl 1
x1 f x2 ... xn // shiftl 2
f x1 ... xn // shiftl 3