MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
until_naive.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_NAIVE_HPP
13 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_NAIVE_HPP
14 
16 
17 
18 namespace boost { namespace mpl11 { namespace detail { namespace left_folds {
26  template <
27  template <typename ...> class predicate,
28  template <typename ...> class f,
29  typename state, typename xs,
30  bool = predicate<xs>::type::value>
31  struct until_naive;
32 
33  template <
34  template <typename ...> class p,
35  template <typename ...> class f,
36  typename state, typename xs>
37  struct until_naive<p, f, state, xs, true>
38  : state
39  { };
40 
41  template <
42  template <typename ...> class p,
43  template <typename ...> class f,
44  typename state, typename xs>
45  struct until_naive<p, f, state, xs, false>
46  : until_naive<p, f, f<state, head<xs>>, tail<xs>>
47  { };
48 }}}} // end namespace boost::mpl11::detail::left_folds
49 
50 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_NAIVE_HPP
Forward declares the Iterable typeclass.
Naive left fold stopping whenever the predicate returns true.
Definition: until_naive.hpp:31