4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::options::product< Left, Right > Class Template Reference

Detailed Description

template<typename Left, typename Right>
class fcppt::options::product< Left, Right >

A product of two parsers.

This parser first applies its left parser and if that succeeds also applies its right parser. Use fcppt::options::apply to create a product of two or more parsers. The result type is a record that contains the elements of both Left and Right. Therefore, Left and Right must have disjoint label sets.

See also
fcppt::options::apply

Public Types

using result_type
 

Public Member Functions

 product (Left &&, Right &&)
 
fcppt::options::parse_result< result_typeparse (fcppt::options::state &&, fcppt::options::parse_context const &) const
 
fcppt::options::flag_name_set flag_names () const
 
fcppt::options::option_name_set option_names () const
 
fcppt::options::usage usage () const
 

Member Typedef Documentation

◆ result_type

template<typename Left , typename Right >
using fcppt::options::product< Left, Right >::result_type
Initial value:
fcppt::record::
disjoint_product<fcppt::options::result_of<Left>, fcppt::options::result_of<Right>>

Constructor & Destructor Documentation

◆ product()

template<typename Left , typename Right >
fcppt::options::product< Left, Right >::product ( Left && ,
Right &&  )

Member Function Documentation

◆ flag_names()

template<typename Left , typename Right >
fcppt::options::flag_name_set fcppt::options::product< Left, Right >::flag_names ( ) const
nodiscard

◆ option_names()

template<typename Left , typename Right >
fcppt::options::option_name_set fcppt::options::product< Left, Right >::option_names ( ) const
nodiscard

◆ parse()

template<typename Left , typename Right >
fcppt::options::parse_result< result_type > fcppt::options::product< Left, Right >::parse ( fcppt::options::state && ,
fcppt::options::parse_context const &  ) const
nodiscard

◆ usage()

template<typename Left , typename Right >
fcppt::options::usage fcppt::options::product< Left, Right >::usage ( ) const
nodiscard