File indexing completed on 2025-01-18 09:38:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP
0011 #define BOOST_INTEGER_STATIC_MIN_MAX_HPP
0012
0013 #include <boost/config.hpp>
0014 #include <boost/integer_fwd.hpp> // self include
0015
0016 namespace boost
0017 {
0018
0019
0020
0021
0022 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
0023 struct static_signed_min
0024 {
0025 BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 > Value2) ? Value2 : Value1 );
0026 };
0027
0028 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
0029 struct static_signed_max
0030 {
0031 BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 < Value2) ? Value2 : Value1 );
0032 };
0033
0034 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
0035 struct static_unsigned_min
0036 {
0037 BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
0038 = (Value1 > Value2) ? Value2 : Value1 );
0039 };
0040
0041 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
0042 struct static_unsigned_max
0043 {
0044 BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
0045 = (Value1 < Value2) ? Value2 : Value1 );
0046 };
0047
0048
0049 }
0050
0051
0052 #endif