9 This is a [link metafunction template metafunction].
13 [[`P`] [[link parser parser]]]
18 It generates a simple interface for parser. It returns a metafunction class that
19 takes an input string, parses it with `P` and returns the result of parsing. It
20 generates a compilation error when parsing fails.
24 It returns a [link metafunction_class template metafunction class]:
34 [[`S`] [[link string string]]]
39 #include <boost/metaparse/build_parser.hpp>
41 [h1 Expression semantics]
43 For any `p` parser and `s` compile-time string
45 build_parser<p>::type::apply<s>
49 get_result<p::apply<s>>
53 #include <boost/metaparse/build_parser.hpp>
54 #include <boost/metaparse/int_.hpp>
55 #include <boost/metaparse/string.hpp>
57 using namespace boost::metaparse;
59 using string_to_int = build_parser<int_>::type;
62 string_to_int::apply<BOOST_METAPARSE_STRING("1113")>::type::value == 1113,
63 "string_to_int should be a metafunction turning a string into an int"