![]() |
Home | Libraries | People | FAQ | More |
boost::parser::transform_replace_view
// In header: <boost/parser/transform_replace.hpp> template<std::ranges::viewable_range V, std::move_constructible F, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct transform_replace_view { // member classes/structs/unions template<bool Const> struct iterator { // types typedef unspecified I; typedef unspecified S; typedef unspecified ref_t_iter; typedef BOOST_PARSER_SUBRANGE< ref_t_iter > reference_type; typedef unspecified base_type; // public member functions iterator() = default; iterator(unspecified); iterator & operator++(); reference_type operator*() const; }; template<bool Const> struct sentinel { }; // public member functions transform_replace_view() = default; transform_replace_view(V, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, F, trace = trace::off); transform_replace_view(V, parser_interface< Parser, GlobalState, ErrorHandler > const &, F, trace = trace::off); V base() const; V base(); F const & f() const; auto begin(); auto end(); auto begin() const; auto end() const; };
Produces a range of subranges of a given range base
. Each subrange is either a subrange of base
that does not match the given parser parser
, or is f(*boost::parser::parse(match, parser))
, where f
is the given invocable and match
is the matching subrange.
In addition to the template parameter constraints, F
must be invocable with the attribute type of Parser
; V
and the range type produced by F
, "`Rf`" must be ranges of char
, or must have the same UTF format; and V
and Rf
must meet the same compatibility requirements as described in std::ranges::join_view
.
transform_replace_view
public member functionstransform_replace_view() = default;
transform_replace_view(V base, parser_interface< Parser, GlobalState, ErrorHandler > const & parser, parser_interface< SkipParser > const & skip, F f, trace trace_mode = trace::off);
transform_replace_view(V base, parser_interface< Parser, GlobalState, ErrorHandler > const & parser, F f, trace trace_mode = trace::off);
V base() const;
V base();
F const & f() const;
auto begin();
auto end();
auto begin() const;
auto end() const;