piranha
0.10
|
Specialisation of piranha::safe_cast() for C++ floating-point to C++ integral conversions. More...
#include <piranha/safe_cast.hpp>
Public Member Functions | |
To | operator() (const From &f) const |
Call operator. More... | |
Specialisation of piranha::safe_cast() for C++ floating-point to C++ integral conversions.
From
is a C++ floating-point type and To
is a C++ integral type. Definition at line 140 of file safe_cast.hpp.
|
inline |
Call operator.
The call operator will first check that f
is a finite integral value, and it will then invoke boost::numeric_cast()
to perform the conversion.
f | conversion argument. |
f
safely converted to To
.piranha::safe_cast_failure | if:
|
Definition at line 154 of file safe_cast.hpp.