MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
list.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_FWD_LIST_HPP
13 #define BOOST_MPL11_FWD_LIST_HPP
14 
17 #include <boost/mpl11/fwd/core.hpp>
22 
23 
24 namespace boost { namespace mpl11 {
44  struct List BOOST_MPL11_IF_DOXYGEN({ });
45 
47  template <typename ...xs>
48  struct list;
49 
51  template <typename ...xs>
53 
55  template <typename x, typename xs>
56  struct cons;
57 
59  template <typename xs, typename x>
61 
63  template <typename f, typename x>
64  struct iterate;
65 
67  template <typename x>
68  struct repeat;
69 
77  template <typename n, typename xs>
78  struct take;
79 
81  template <detail::std_size_t n, typename xs>
83 
84  namespace list_detail {
85  template <typename predicate> struct take_while_op;
86  template <typename predicate> struct filter_op;
87  }
88 
93  template <typename predicate, typename xs>
95  foldr<list_detail::take_while_op<predicate>, list<>, xs>);
96 
98  template <typename predicate, typename xs>
100  take_while<compose<lift<not_>, predicate>, xs>);
101 
103  template <typename xs>
105 
107  template <typename predicate, typename xs>
109  foldr<list_detail::filter_op<predicate>, list<>, xs>);
110 
115  template <typename f, typename state, typename xs>
116  struct scanl;
117 
135  template <typename f, typename ...lists>
136  struct zip_with;
137 
139  template <typename ...lists>
141 
148  template <typename ...lists>
149  struct concat;
150 
159  template <typename xs, typename start, typename stop>
160  struct slice;
161 
163  template <typename xs, detail::std_size_t start, detail::std_size_t stop>
165 
167  template <typename predicate, typename xs>
168  struct sort_by;
169 
176  template <typename xs>
177  struct init;
179 }} // end namespace boost::mpl11
180 
181 #endif // !BOOST_MPL11_FWD_LIST_HPP
Returns a List containing only the elements satisfying predicate.
Definition: list.hpp:109
Boxes its argument.
Definition: core.hpp:46
Returns the longest prefix of a List in which all elements satisfy the predicate. ...
Definition: list.hpp:95
Forward declares the Functional module.
Equivalent to take, xs>.
Definition: list.hpp:82
Forward declares the Core module.
A List created by prepending an element to an Iterable.
Definition: list.hpp:56
Equivalent to take_while with a negated predicate.
Definition: list.hpp:100
Equivalent to zip_with, lists...>.
Definition: list.hpp:140
Lifts a metafunction.
Definition: functional.hpp:155
Forward declares the Integer datatype.
Returns the elements before the last one of a non-empty list.
Definition: list.hpp:177
Returns a subrange of a list.
Definition: list.hpp:160
Returns an infinite List of repeated applications of f to x.
Definition: list.hpp:64
Manages configurable options of the library and defines utility macros.
Concatenate several lists.
Definition: list.hpp:149
scanl is similar to foldl, but returns a List of successive reduced values from the left...
Definition: list.hpp:116
Returns a list sorted with the predicate.
Definition: list.hpp:168
Forward declares logical metafunctions.
Defines boost::mpl11::detail::std_size_t.
Returns a List with its elements in reverse order.
Definition: list.hpp:104
A List containing the given elements.
Definition: list.hpp:48
Returns an infinite List containing copies of x.
Definition: list.hpp:68
Alias to integer_c; provided for convenience.
Definition: integer.hpp:122
Right-associative fold of a structure using a binary operation.
Definition: foldable.hpp:56
#define BOOST_MPL11_IF_DOXYGEN(...)
Macro expanding to its argument(s) when generating the documentation with Doxygen and to nothing othe...
Definition: config.hpp:45
Returns the composition of several metafunction classes.
Definition: functional.hpp:213
A List created by appending an element to an Iterable.
Definition: list.hpp:60
Constructor equivalent to list, except it takes unboxed arguments.
Definition: list.hpp:52
#define BOOST_MPL11_DOXYGEN_ALIAS(NAME,...)
Macro expanding to a struct when generating the documentation and to an alias otherwise.
Definition: config.hpp:56
Returns a metafunction class invoking f with its two first arguments in reverse order.
Definition: functional.hpp:47
Equivalent to slice, size_t>.
Definition: list.hpp:164
Left-associative fold of a structure using a binary operation.
Definition: foldable.hpp:62
Returns a list of applications of f to the elements of the zipped lists, in lockstep.
Definition: list.hpp:136
Returns the first n elements of a List.
Definition: list.hpp:78
Forward declares the Foldable typeclass.