Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template replace_view

boost::parser::replace_view

Synopsis

// 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;
};

Description

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 functions

  1. replace_view() = default;
  2. replace_view(V base, 
                 parser_interface< Parser, GlobalState, ErrorHandler > const & parser, 
                 parser_interface< SkipParser > const & skip, 
                 ReplacementV replacement, trace trace_mode = trace::off);
  3. replace_view(V base, 
                 parser_interface< Parser, GlobalState, ErrorHandler > const & parser, 
                 ReplacementV replacement, trace trace_mode = trace::off);
  4. constexpr V base() const;
  5. constexpr V base();
  6. constexpr V replacement() const;
  7. constexpr V replacement();
  8. constexpr auto begin();
  9. constexpr auto end();
  10. constexpr auto begin() const;
  11. constexpr auto end() const;

PrevUpHomeNext