Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_METAPARSE_V1_TRANSFORM_HPP
0002 #define BOOST_METAPARSE_V1_TRANSFORM_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2009 - 2010.
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/accept.hpp>
0010 #include <boost/metaparse/v1/get_result.hpp>
0011 #include <boost/metaparse/v1/get_remaining.hpp>
0012 #include <boost/metaparse/v1/get_position.hpp>
0013 #include <boost/metaparse/v1/unless_error.hpp>
0014 
0015 #include <boost/mpl/eval_if.hpp>
0016 
0017 namespace boost
0018 {
0019   namespace metaparse
0020   {
0021     namespace v1
0022     {
0023       template <class P, class T>
0024       struct transform
0025       {
0026       private:
0027         template <class S, class Pos>
0028         struct no_error :
0029           accept<
0030             typename T::template apply<
0031               typename get_result<typename P::template apply<S, Pos> >::type
0032             >::type,
0033             get_remaining<typename P::template apply<S, Pos> >,
0034             get_position<typename P::template apply<S, Pos> >
0035           >
0036         {};
0037       public:
0038         typedef transform type;
0039         
0040         template <class S, class Pos>
0041         struct apply :
0042           unless_error<typename P::template apply<S, Pos>, no_error<S, Pos> >
0043         {};
0044       };
0045     }
0046   }
0047 }
0048 
0049 #endif
0050