File indexing completed on 2025-01-30 09:49:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP
0012 #define BOOST_NUMERIC_INTERVAL_LIMITS_HPP
0013
0014
0015 #include <boost/config.hpp>
0016 #include <boost/limits.hpp>
0017 #include <boost/numeric/interval/detail/interval_prototype.hpp>
0018
0019 namespace std {
0020
0021 template<class T, class Policies>
0022 class numeric_limits<boost::numeric::interval<T, Policies> >
0023 : public numeric_limits<T>
0024 {
0025 private:
0026 typedef boost::numeric::interval<T, Policies> I;
0027 typedef numeric_limits<T> bl;
0028 public:
0029 static I min BOOST_PREVENT_MACRO_SUBSTITUTION () BOOST_NOEXCEPT_OR_NOTHROW { return I((bl::min)(), (bl::min)()); }
0030 static I max BOOST_PREVENT_MACRO_SUBSTITUTION () BOOST_NOEXCEPT_OR_NOTHROW { return I((bl::max)(), (bl::max)()); }
0031 static I epsilon() BOOST_NOEXCEPT_OR_NOTHROW { return I(bl::epsilon(), bl::epsilon()); }
0032
0033 BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
0034 BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
0035
0036 static I infinity () BOOST_NOEXCEPT_OR_NOTHROW { return I::whole(); }
0037 static I quiet_NaN() BOOST_NOEXCEPT_OR_NOTHROW { return I::empty(); }
0038 static I signaling_NaN() BOOST_NOEXCEPT_OR_NOTHROW
0039 { return I(bl::signaling_NaN(), bl::signaling_Nan()); }
0040 static I denorm_min() BOOST_NOEXCEPT_OR_NOTHROW
0041 { return I(bl::denorm_min(), bl::denorm_min()); }
0042 private:
0043 static I round_error();
0044 };
0045
0046 }
0047
0048
0049 #endif