6.hpp 681 B

12345678910111213141516171819202122232425
  1. #ifndef BOOST_METAPARSE_GETTING_STARTED_6_HPP
  2. #define BOOST_METAPARSE_GETTING_STARTED_6_HPP
  3. // Automatically generated header file
  4. // Definitions before section 5.2.4
  5. #include "5_2_4.hpp"
  6. // Definitions of section 5.2.4
  7. #include <boost/metaparse/foldl_start_with_parser.hpp>
  8. using exp_parser11 =
  9. build_parser<
  10. foldl_start_with_parser<
  11. sequence<plus_token, int_token>, /* apply this parser repeatedly */
  12. int_token, /* use this parser to get the initial value */
  13. boost::mpl::quote2<sum_items> /* use this function to add a new value to the summary */
  14. >
  15. >;
  16. // query:
  17. // exp_parser11::apply<BOOST_METAPARSE_STRING("1 + 2 + 3 + 4")>::type
  18. #endif