[#entire_input] [section entire_input] [h1 Synopsis] template struct entire_input; This is a [link parser_combinator parser combinator]. [table Arguments [[Name] [Type]] [[`P`] [[link parser parser]]] [[`Msg`] [[link parsing_error_message parsing error message]]] ] [h1 Description] It parses the input using `P` and checks if it consumes the entire input. If `P` fails or doesn't consume the entire input, `entire_input` fails. Otherwise `entire_input` returns the result of `P`. When `P` does not consume the entire input, the error message returned by `entire_input` is `Msg`. [h1 Header] #include [h1 Expression semantics] For any `p` parser and `e` parsing error message the following are equivalent entire_input first_of< p, change_error_message, e> > [h1 Example] #include #include #include #include #include #include #include using namespace boost::metaparse; BOOST_METAPARSE_DEFINE_ERROR(extra_chars_at_end, "Extra chars at end"); using int_parser = entire_input; static_assert( get_result< int_parser::apply >::type::value == 1113, "it should parse the input if it contains only an integer" ); static_assert( std::is_same< get_message< int_parser::apply >::type, extra_chars_at_end >::type::value, "it should return the specified error message when there are extra characters" ); [endsect]