[#next_line] [section next_line] [h1 Synopsis] template struct next_line; This is a [link lazy_metafunction lazy template metafunction]. [table Arguments [[Name] [Type]] [[`SourcePosition`] [[link source_position source position]]] [[`Ch`] [[link boxed_value boxed] character value. The character `SourcePosition` points to in the input.]] ] [h1 Description] Returns a new source position, pointing to the beginning of the next line. [h1 Header] #include [h1 Expression semantics] For any `s` source position and `c` wrapped character the following are equivalent get_col>::type boost::mpl::int_<1> get_line> boost::mpl::plus::type, boost::mpl::int_<1>> get_prev_char>::type c [h1 Example] #include #include #include #include #include #include using namespace boost::metaparse; struct returns_source_position { using type = source_position< std::integral_constant, std::integral_constant, std::integral_constant >; }; struct returns_char { using type = std::integral_constant; }; static_assert( get_col< next_line< source_position< std::integral_constant, std::integral_constant, std::integral_constant >, std::integral_constant > >::type::value == 1, "it should set the column to 1" ); static_assert( get_line< next_line< source_position< std::integral_constant, std::integral_constant, std::integral_constant >, std::integral_constant > >::type::value == 12, "it should increase the line component of the source position" ); static_assert( get_prev_char< next_line< source_position< std::integral_constant, std::integral_constant, std::integral_constant >, std::integral_constant > >::type::value == '\n', "it should update the prev char component of the source position" ); static_assert( get_col>::type::value == 1, "it should support lazy evaluation" ); [endsect]