sl@0: /* Boost interval/limits.hpp template implementation file sl@0: * sl@0: * Copyright 2000 Jens Maurer sl@0: * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion sl@0: * sl@0: * Distributed under the Boost Software License, Version 1.0. sl@0: * (See accompanying file LICENSE_1_0.txt or sl@0: * copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: */ sl@0: sl@0: #ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP sl@0: #define BOOST_NUMERIC_INTERVAL_LIMITS_HPP sl@0: sl@0: #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: namespace std { sl@0: sl@0: template sl@0: class numeric_limits > sl@0: : public numeric_limits sl@0: { sl@0: private: sl@0: typedef boost::numeric::interval I; sl@0: typedef numeric_limits bl; sl@0: public: sl@0: static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); } sl@0: static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); } sl@0: static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); } sl@0: sl@0: BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate); sl@0: BOOST_STATIC_CONSTANT(bool, is_iec559 = false); sl@0: sl@0: static I infinity () throw() { return I::whole(); } sl@0: static I quiet_NaN() throw() { return I::empty(); } sl@0: static I signaling_NaN() throw() sl@0: { return I(bl::signaling_NaN(), bl::signaling_Nan()); } sl@0: static I denorm_min() throw() sl@0: { return I(bl::denorm_min(), bl::denorm_min()); } sl@0: private: sl@0: static I round_error(); // hide this on purpose, not yet implemented sl@0: }; sl@0: sl@0: } // namespace std sl@0: sl@0: #endif sl@0: sl@0: #endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP