File indexing completed on 2025-01-18 09:51:37
0001 #ifndef BOOST_NUMERIC_SAFE_COMMON_HPP
0002 #define BOOST_NUMERIC_SAFE_COMMON_HPP
0003
0004
0005
0006
0007
0008
0009
0010 #include <type_traits>
0011
0012 namespace boost {
0013 namespace safe_numerics {
0014
0015
0016 template<typename T>
0017 struct is_safe : public std::false_type
0018 {};
0019
0020 template<typename T>
0021 struct base_type {
0022 using type = T;
0023 };
0024
0025 template<class T>
0026 constexpr const typename base_type<T>::type & base_value(const T & t) {
0027 return static_cast<const typename base_type<T>::type & >(t);
0028 }
0029
0030 template<typename T>
0031 struct get_promotion_policy {
0032 using type = void;
0033 };
0034
0035 template<typename T>
0036 struct get_exception_policy {
0037 using type = void;
0038 };
0039
0040
0041 }
0042 }
0043
0044 #endif