[#build_parser] [section build_parser] [h1 Synopsis] template struct build_parser; This is a [link metafunction template metafunction]. [table Arguments [[Name] [Type]] [[`P`] [[link parser parser]]] ] [h1 Description] It generates a simple interface for parser. It returns a metafunction class that takes an input string, parses it with `P` and returns the result of parsing. It generates a compilation error when parsing fails. [h1 Return value] It returns a [link metafunction_class template metafunction class]: struct { template struct apply; }; [table Arguments [[Name] [Type]] [[`S`] [[link string string]]] ] [h1 Header] #include [h1 Expression semantics] For any `p` parser and `s` compile-time string build_parser

::type::apply is equivalent to get_result> [h1 Example] #include #include #include using namespace boost::metaparse; using string_to_int = build_parser::type; static_assert( string_to_int::apply::type::value == 1113, "string_to_int should be a metafunction turning a string into an int" ); [endsect]