4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions
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 = fcppt::record::disjoint_product< fcppt::options::result_of< Left >, fcppt::options::result_of< Right > >
 

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 = 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

◆ option_names()

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

◆ 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

◆ usage()

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