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_RIGHT_FOLDS_UNTIL_NAIVE_HPP
13 #define BOOST_MPL11_DETAIL_RIGHT_FOLDS_UNTIL_NAIVE_HPP
14 
16 
17 
18 namespace boost { namespace mpl11 { namespace detail { namespace right_folds {
24  template <
25  template <typename ...> class predicate,
26  template <typename ...> class f,
27  typename state, typename xs,
28  bool = predicate<xs>::type::value>
29  struct until_naive;
30 
31  template <
32  template <typename ...> class p,
33  template <typename ...> class f,
34  typename state, typename xs>
35  struct until_naive<p, f, state, xs, true>
36  : state
37  { };
38 
39  template <
40  template <typename ...> class p,
41  template <typename ...> class f,
42  typename state, typename xs>
43  struct until_naive<p, f, state, xs, false>
44  : f<head<xs>, until_naive<p, f, state, tail<xs>>>
45  { };
46 }}}} // end namespace boost::mpl11::detail::right_folds
47 
48 #endif // !BOOST_MPL11_DETAIL_RIGHT_FOLDS_UNTIL_NAIVE_HPP
Forward declares the Iterable typeclass.
Naive right fold stopping whenever the predicate returns true.
Definition: until_naive.hpp:29