4.5.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::parse::error< Ch > Class Template Reference

Detailed Description

template<typename Ch>
class fcppt::parse::error< Ch >

The error type.

An error consists of an fcppt::parse::error_variant and a bit telling if the error is fatal. Fatal error are used by parsers such as fcppt::parse::alternative and fcppt::parse::repetition to stop early. This can improve error messages and reduce backtracking time.

Public Types

using variant_type = fcppt::parse::error_variant<Ch>
 

Public Member Functions

 error (variant_type &&, fcppt::parse::is_fatal)
 
bool is_fatal () const
 
variant_typeget ()
 
variant_type const & get () const
 
bool operator== (error const &) const =default
 

Member Typedef Documentation

◆ variant_type

template<typename Ch >
using fcppt::parse::error< Ch >::variant_type = fcppt::parse::error_variant<Ch>

Constructor & Destructor Documentation

◆ error()

template<typename Ch >
fcppt::parse::error< Ch >::error ( variant_type && ,
fcppt::parse::is_fatal  )

Member Function Documentation

◆ get() [1/2]

template<typename Ch >
variant_type & fcppt::parse::error< Ch >::get ( )
nodiscard

◆ get() [2/2]

template<typename Ch >
variant_type const & fcppt::parse::error< Ch >::get ( ) const
nodiscard

◆ is_fatal()

template<typename Ch >
bool fcppt::parse::error< Ch >::is_fatal ( ) const
nodiscard

◆ operator==()

template<typename Ch >
bool fcppt::parse::error< Ch >::operator== ( error< Ch > const & ) const
nodiscarddefault