Struct template opt_parser
boost::parser::opt_parser
Synopsis
template<typename Parser>
struct opt_parser {
template<typename Iter, typename Sentinel, typename Context,
typename SkipParser>
(, , , ,
, ) ;
template<typename Iter, typename Sentinel, typename Context,
typename SkipParser, typename Attribute>
(, , , ,
, , ) ;
parser_;
};
Description
Repeats the application of another parser of type Parser, [0, 1] times. The parse always succeeds. The attribute produced is a std::optional<T>, where T is the type of attribute produced by Parser.
opt_parser public member functions
template<typename Iter, typename Sentinel, typename Context,
typename SkipParser>
( first, last, context,
skip, flags, success) ;
template<typename Iter, typename Sentinel, typename Context,
typename SkipParser, typename Attribute>
( first, last, context,
skip, flags, success,
retval) ;