1 #ifndef BOOST_METAPARSE_V1_FAIL_AT_FIRST_CHAR_EXPECTED_HPP
2 #define BOOST_METAPARSE_V1_FAIL_AT_FIRST_CHAR_EXPECTED_HPP
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #include <boost/metaparse/v1/impl/void_.hpp>
10 #include <boost/metaparse/v1/accept.hpp>
11 #include <boost/metaparse/v1/reject.hpp>
12 #include <boost/metaparse/v1/is_error.hpp>
13 #include <boost/metaparse/v1/get_position.hpp>
15 #include <boost/metaparse/v1/error/expected_to_fail.hpp>
17 #include <boost/mpl/eval_if.hpp>
18 #include <boost/mpl/equal_to.hpp>
27 struct fail_at_first_char_expected
30 template <class S, class Pos>
33 typename boost::mpl::equal_to<
35 typename get_position<typename P::template apply<S, Pos> >::type
37 accept<impl::void_, S, Pos>,
38 typename P::template apply<S, Pos>
42 typedef fail_at_first_char_expected type;
44 template <class S, class Pos>
47 typename is_error<typename P::template apply<S, Pos> >::type,
49 reject<error::expected_to_fail, Pos>