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

Detailed Description

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

Converts the success value of a parser into another success value.

If the parser p returns s, then convert(p,f) returns the success value f(s). Errors returned by p remain unchanged.

Template Parameters
ResultThe success type of this parser.
Inheritance diagram for fcppt::parse::convert< Parser, Result >:
fcppt::parse::tag

Public Types

using result_type = Result
 
using function_type = fcppt::function<result_type(fcppt::parse::result_of<Parser> &&)>
 

Public Member Functions

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

Member Typedef Documentation

◆ function_type

template<typename Parser , typename Result >
using fcppt::parse::convert< Parser, Result >::function_type = fcppt::function<result_type(fcppt::parse::result_of<Parser> &&)>

◆ result_type

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

Constructor & Destructor Documentation

◆ convert()

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

Member Function Documentation

◆ parse()

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