4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::parse::convert_const< Parser, Result > Class Template Reference

Detailed Description

template<typename Parser, typename Result>
class fcppt::parse::convert_const< Parser, Result >

Replaces the success value of a parser with a constant.

If the parser p returns s, then convert_const(p,r) returns r. Errors remain unchanged.

Template Parameters
ResultThe success type of this parser.
ParserA parser with no result.
Inheritance diagram for fcppt::parse::convert_const< Parser, Result >:
fcppt::parse::tag

Public Types

using result_type = Result
 

Public Member Functions

 convert_const (Parser &&, Result &&)
 
template<typename Ch , typename Skipper >
fcppt::parse::result< Ch, result_typeparse (fcppt::reference< fcppt::parse::basic_stream< Ch > >, Skipper const &) const
 

Member Typedef Documentation

◆ result_type

template<typename Parser , typename Result >
using fcppt::parse::convert_const< Parser, Result >::result_type = Result

Constructor & Destructor Documentation

◆ convert_const()

template<typename Parser , typename Result >
fcppt::parse::convert_const< Parser, Result >::convert_const ( Parser && ,
Result &&  )

Member Function Documentation

◆ parse()

template<typename Parser , typename Result >
template<typename Ch , typename Skipper >
fcppt::parse::result< Ch, result_type > fcppt::parse::convert_const< Parser, Result >::parse ( fcppt::reference< fcppt::parse::basic_stream< Ch > > ,
Skipper const &  ) const
nodiscard