Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_METAPARSE_V1_EXCEPT_HPP
0002 #define BOOST_METAPARSE_V1_EXCEPT_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2009 - 2011.
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/is_error.hpp>
0010 #include <boost/metaparse/v1/accept.hpp>
0011 #include <boost/metaparse/v1/reject.hpp>
0012 
0013 #include <boost/mpl/if.hpp>
0014 
0015 namespace boost
0016 {
0017   namespace metaparse
0018   {
0019     namespace v1
0020     {
0021       template <class P, class Result, class ErrorMsg>
0022       struct except
0023       {
0024         typedef except type;
0025         
0026         template <class S, class Pos>
0027         struct apply :
0028           boost::mpl::if_<
0029             is_error<typename P::template apply<S, Pos> >,
0030             accept<Result, S, Pos>,
0031             reject<ErrorMsg, Pos>
0032           >
0033         {};
0034       };
0035     }
0036   }
0037 }
0038 
0039 #endif
0040