MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
until_aliased.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_ALIASED_HPP
13 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_ALIASED_HPP
14 
16 
17 
18 namespace boost { namespace mpl11 { namespace detail { namespace left_folds {
19  template <bool done>
20  struct until_aliased_impl;
21 
22  template <>
23  struct until_aliased_impl<true> {
24  template <
25  template <typename ...> class pred,
26  template <typename ...> class f,
27  typename state, typename xs>
28  using apply = state;
29  };
30 
31  template <>
32  struct until_aliased_impl<false> {
33  template <
34  template <typename ...> class pred,
35  template <typename ...> class f,
36  typename state, typename xs>
37  using apply =
38  typename until_aliased_impl<pred<tail<xs>>::type::value>::
39  template apply<pred, f, f<state, head<xs>>, tail<xs>>;
40  };
41 
49  template <
50  template <typename ...> class predicate,
51  template <typename ...> class f,
52  typename state, typename xs>
53  using until_aliased =
54  typename until_aliased_impl<predicate<xs>::type::value>::
56 }}}} // end namespace boost::mpl11::detail::left_folds
57 
58 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_ALIASED_HPP
Forward declares the Iterable typeclass.
Invokes a metafunction class with the given arguments.
Definition: functional.hpp:39