1[#get_remaining] 2[section get_remaining] 3 4[h1 Synopsis] 5 6 template <class D> 7 struct get_remaining; 8 9This is a [link lazy_metafunction lazy template metafunction]. 10 11[table Arguments 12 [[Name] [Type]] 13 [[`D`] [[link accept accept] value]] 14] 15 16[h1 Description] 17 18Returns the remaining string information of a parsing result. 19 20[h1 Header] 21 22 #include <boost/metaparse/get_remaining.hpp> 23 24[h1 Example] 25 26 #include <boost/metaparse/get_remaining.hpp> 27 #include <boost/metaparse/start.hpp> 28 #include <boost/metaparse/accept.hpp> 29 #include <boost/metaparse/string.hpp> 30 31 #include <type_traits> 32 33 using namespace boost::metaparse; 34 35 struct returns_accept 36 { 37 using type = 38 accept< 39 std::integral_constant<int, 13>, 40 BOOST_METAPARSE_STRING("foo"), 41 start 42 >; 43 }; 44 45 static_assert( 46 std::is_same< 47 BOOST_METAPARSE_STRING("foo"), 48 get_remaining< 49 accept< 50 std::integral_constant<int, 13>, 51 BOOST_METAPARSE_STRING("foo"), 52 start 53 > 54 >::type 55 >::type::value, 56 "It should return the remaining input" 57 ); 58 59 static_assert( 60 std::is_same< 61 BOOST_METAPARSE_STRING("foo"), 62 get_remaining<returns_accept>::type 63 >::type::value, 64 "It should support lazy evaluation" 65 ); 66 67[endsect] 68 69