piranha  0.10
Public Member Functions | List of all members
piranha::safe_cast_impl< To, From, sc_rat_enabler< To, From > > Struct Template Reference

Specialisation of piranha::safe_cast() for conversions involving piranha::mp_rational. More...

#include <piranha/mp_rational.hpp>

Public Member Functions

To operator() (const From &x) const
 Call operator. More...
 

Detailed Description

template<typename To, typename From>
struct piranha::safe_cast_impl< To, From, sc_rat_enabler< To, From > >

Specialisation of piranha::safe_cast() for conversions involving piranha::mp_rational.

Note
This specialisation is enabled in the following cases:

Definition at line 2185 of file mp_rational.hpp.

Member Function Documentation

◆ operator()()

template<typename To , typename From >
To piranha::safe_cast_impl< To, From, sc_rat_enabler< To, From > >::operator() ( const From &  x) const
inline

Call operator.

The conversion is performed via piranha::mp_rational's constructor and conversion operator.

Parameters
xinput value.
Returns
x converted to To.
Exceptions
piranha::safe_cast_failureif the conversion fails.

Definition at line 2227 of file mp_rational.hpp.


The documentation for this struct was generated from the following file: