Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template if_directive

boost::parser::if_directive

Synopsis

// In header: <boost/parser/parser.hpp>

template<typename Predicate> 
struct if_directive {

  // public member functions
  template<typename Parser2> 
    constexpr auto operator[](parser_interface< Parser2 >) const noexcept;

  // public data members
  Predicate pred_;
};

Description

Represents a sequence parser, the first parser of which is an epsilon_parser with predicate, as a directive (e.g. if_(pred)[p]).

if_directive public member functions

  1. template<typename Parser2> 
      constexpr auto operator[](parser_interface< Parser2 > rhs) const noexcept;

PrevUpHomeNext