1 #ifndef BOOST_NUMERIC_SAFE_INTEGER_HPP 2 #define BOOST_NUMERIC_SAFE_INTEGER_HPP 3 4 // Copyright (c) 2012 Robert Ramey 5 // 6 // Distributed under the Boost Software License, Version 1.0. (See 7 // accompanying file LICENSE_1_0.txt or copy at 8 // http://www.boost.org/LICENSE_1_0.txt) 9 10 // not actually used here - but needed for integer arithmetic 11 // so this is a good place to include it 12 #include "checked_integer.hpp" 13 #include "checked_result_operations.hpp" 14 15 #include "safe_base.hpp" 16 #include "safe_base_operations.hpp" 17 18 #include "native.hpp" 19 #include "exception_policies.hpp" 20 21 // specialization for meta functions with safe<T> argument 22 namespace boost { 23 namespace safe_numerics { 24 25 template < 26 class T, 27 class P = native, 28 class E = default_exception_policy 29 > 30 using safe = safe_base< 31 T, 32 ::std::numeric_limits<T>::min(), 33 ::std::numeric_limits<T>::max(), 34 P, 35 E 36 >; 37 38 } // safe_numerics 39 } // boost 40 41 42 #endif // BOOST_NUMERIC_SAFE_INTEGER_HPP 43