Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
value::to_number (2 of 2 overloads)

Return the stored number cast to an arithmetic type.

Synopsis
template<
    class T>
T
to_number() const;
Description

This function attempts to return the stored value converted to the arithmetic type T which may not be bool:

Constraints
std::is_arithmetic< T >::value && ! std::is_same< T, bool >::value
Complexity

Constant.

Return Value

The converted number.

Exceptions

Type

Thrown On

system_error

on error.


PrevUpHomeNext