Home | Libraries | People | FAQ | More |
template <class D> struct get_result;
This is a lazy template metafunction.
Returns the result information of a parsing result.
#include <boost/metaparse/get_result.hpp>
#include <boost/metaparse/get_result.hpp> #include <boost/metaparse/start.hpp> #include <boost/metaparse/accept.hpp> #include <boost/metaparse/string.hpp> using namespace boost::metaparse; struct returns_accept { using type = accept< std::integral_constant<int, 13>, BOOST_METAPARSE_STRING("foo"), start >; }; static_assert( get_result< accept< std::integral_constant<int, 13>, BOOST_METAPARSE_STRING("foo"), start > >::type::value == 13, "It should return the result of parsing" ); static_assert( get_result<returns_accept>::type::value == 13, "It should support lazy evaluation" );