Back to home page

EIC code displayed by LXR

 
 

    


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

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