ネームスペース | 構成 | 関数

ネームスペース NSSafeCalculation

ネームスペース

namespace  impl

構成

struct  overflow_static_cast
 オーバーフローすると例外を発生させるstatic_cast. [詳細]
struct  no_overflow_static_cast
 オーバーフローするとキャスト先の型の最大または最小値になるstatic_cast. [詳細]

関数

template<typename T >
OverflowAdd (const T &lhs, const T &rhs) throw (std::overflow_error)
template<typename T >
OverflowSub (const T &lhs, const T &rhs) throw (std::overflow_error)
template<typename T >
OverflowMul (const T &lhs, const T &rhs) throw (std::overflow_error)
template<typename T >
OverflowDiv (const T &lhs, const T &rhs) throw (std::overflow_error, std::logic_error)
template<typename T >
NoOverflowAdd (const T &lhs, const T &rhs) throw ()
template<typename T >
NoOverflowSub (const T &lhs, const T &rhs) throw ()
template<typename T >
NoOverflowMul (const T &lhs, const T &rhs) throw ()
template<typename T >
NoOverflowDiv (const T &lhs, const T &rhs) throw (std::logic_error)

関数

template<typename T >
T NSSafeCalculation::NoOverflowAdd ( const T &  lhs,
const T &  rhs 
) throw ()
template<typename T >
T NSSafeCalculation::NoOverflowDiv ( const T &  lhs,
const T &  rhs 
) throw (std::logic_error)
template<typename T >
T NSSafeCalculation::NoOverflowMul ( const T &  lhs,
const T &  rhs 
) throw ()
template<typename T >
T NSSafeCalculation::NoOverflowSub ( const T &  lhs,
const T &  rhs 
) throw ()
template<typename T >
T NSSafeCalculation::OverflowAdd ( const T &  lhs,
const T &  rhs 
) throw (std::overflow_error)
template<typename T >
T NSSafeCalculation::OverflowDiv ( const T &  lhs,
const T &  rhs 
) throw (std::overflow_error, std::logic_error)
template<typename T >
T NSSafeCalculation::OverflowMul ( const T &  lhs,
const T &  rhs 
) throw (std::overflow_error)
template<typename T >
T NSSafeCalculation::OverflowSub ( const T &  lhs,
const T &  rhs 
) throw (std::overflow_error)