Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:40:48

0001 #ifndef BOOST_METAPARSE_V1_IMPL_ITERATE_IMPL_HPP
0002 #define BOOST_METAPARSE_V1_IMPL_ITERATE_IMPL_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2013.
0005 // Distributed under the Boost Software License, Version 1.0.
0006 //    (See accompanying file LICENSE_1_0.txt or copy at
0007 //          http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #include <boost/metaparse/v1/impl/iterate_impl_unchecked.hpp>
0010 #include <boost/metaparse/v1/return_.hpp>
0011 #include <boost/metaparse/v1/is_error.hpp>
0012 
0013 #include <boost/mpl/eval_if.hpp>
0014 
0015 namespace boost
0016 {
0017   namespace metaparse
0018   {
0019     namespace v1
0020     {
0021       namespace impl
0022       {
0023         template <int N, class P, class Accum>
0024         struct iterate_impl
0025         {
0026           typedef iterate_impl type;
0027           
0028           template <class S, class Pos>
0029           struct apply :
0030             boost::mpl::eval_if<
0031               typename is_error<typename P::template apply<S, Pos> >::type,
0032               typename P::template apply<S, Pos>,
0033               iterate_impl_unchecked<N, P, Accum, S, Pos>
0034             >
0035           {};
0036         };
0037         
0038         template <class P, class Accum>
0039         struct iterate_impl<0, P, Accum> : return_<Accum> {};
0040       }
0041     }
0042   }
0043 }
0044 
0045 #endif
0046