![]() |
Home | Libraries | People | FAQ | More |
boost::parser::replace_view
// In header: <boost/parser/replace.hpp> template<std::ranges::viewable_range V, std::ranges::viewable_range ReplacementV, typename Parser, typename GlobalState, typename ErrorHandler, typename SkipParser> struct 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); constexpr iterator & operator++(); constexpr reference_type operator*() const; }; template<bool Const> struct sentinel { }; // public member functions replace_view() = default; replace_view(V, parser_interface< Parser, GlobalState, ErrorHandler > const &, parser_interface< SkipParser > const &, ReplacementV, trace = trace::off); replace_view(V, parser_interface< Parser, GlobalState, ErrorHandler > const &, ReplacementV, trace = trace::off); constexpr V base() const; constexpr V base(); constexpr V replacement() const; constexpr V replacement(); constexpr auto begin(); constexpr auto end(); constexpr auto begin() const; constexpr 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 the given replacement for a match, replacement
.
In addition to the template parameter constraints, V
and ReplacementV
must be ranges of char
, or must have the same UTF format, and V
and ReplacementV
must meet the same compatibility requirements as described in std::ranges::join_view
.
replace_view
public member functionsreplace_view() = default;
replace_view(V base, parser_interface< Parser, GlobalState, ErrorHandler > const & parser, parser_interface< SkipParser > const & skip, ReplacementV replacement, trace trace_mode = trace::off);
replace_view(V base, parser_interface< Parser, GlobalState, ErrorHandler > const & parser, ReplacementV replacement, trace trace_mode = trace::off);
constexpr V base() const;
constexpr V base();
constexpr V replacement() const;
constexpr V replacement();
constexpr auto begin();
constexpr auto end();
constexpr auto begin() const;
constexpr auto end() const;