Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_METAPARSE_V1_IS_ERROR_HPP
0002 #define BOOST_METAPARSE_V1_IS_ERROR_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  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/fail_tag.hpp>
0010 
0011 #include <boost/mpl/tag.hpp>
0012 #include <boost/mpl/vector.hpp>
0013 
0014 #include <boost/type_traits/is_same.hpp>
0015 
0016 namespace boost
0017 {
0018   namespace metaparse
0019   {
0020     namespace v1
0021     {
0022       template <class T = boost::mpl::na>
0023       struct is_error :
0024         boost::is_same<
0025           fail_tag,
0026           typename boost::mpl::tag<typename T::type>::type
0027         >
0028       {};
0029 
0030       template <>
0031       struct is_error<boost::mpl::na>
0032       {
0033         typedef is_error type;
0034 
0035         template <class T = boost::mpl::na>
0036         struct apply : is_error<T> {};
0037       };
0038     }
0039   }
0040 }
0041 
0042 #endif
0043