| Home | Libraries | People | FAQ | More

## 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>
        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>
         auto operator[](parser_interface< Parser2 > rhs) const noexcept;