]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/numeric/interval/limits.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / numeric / interval / limits.hpp
CommitLineData
7c673cae
FG
1/* Boost interval/limits.hpp template implementation file
2 *
3 * Copyright 2000 Jens Maurer
b32b8144 4 * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
7c673cae
FG
5 *
6 * Distributed under the Boost Software License, Version 1.0.
7 * (See accompanying file LICENSE_1_0.txt or
8 * copy at http://www.boost.org/LICENSE_1_0.txt)
9 */
10
11#ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP
12#define BOOST_NUMERIC_INTERVAL_LIMITS_HPP
13
14
15#include <boost/config.hpp>
16#include <boost/limits.hpp>
17#include <boost/numeric/interval/detail/interval_prototype.hpp>
18
19namespace std {
20
21template<class T, class Policies>
22class numeric_limits<boost::numeric::interval<T, Policies> >
23 : public numeric_limits<T>
24{
25private:
26 typedef boost::numeric::interval<T, Policies> I;
27 typedef numeric_limits<T> bl;
28public:
92f5a8d4
TL
29 static I min BOOST_PREVENT_MACRO_SUBSTITUTION () BOOST_NOEXCEPT_OR_NOTHROW { return I((bl::min)(), (bl::min)()); }
30 static I max BOOST_PREVENT_MACRO_SUBSTITUTION () BOOST_NOEXCEPT_OR_NOTHROW { return I((bl::max)(), (bl::max)()); }
31 static I epsilon() BOOST_NOEXCEPT_OR_NOTHROW { return I(bl::epsilon(), bl::epsilon()); }
7c673cae
FG
32
33 BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
34 BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
35
92f5a8d4
TL
36 static I infinity () BOOST_NOEXCEPT_OR_NOTHROW { return I::whole(); }
37 static I quiet_NaN() BOOST_NOEXCEPT_OR_NOTHROW { return I::empty(); }
38 static I signaling_NaN() BOOST_NOEXCEPT_OR_NOTHROW
7c673cae 39 { return I(bl::signaling_NaN(), bl::signaling_Nan()); }
92f5a8d4 40 static I denorm_min() BOOST_NOEXCEPT_OR_NOTHROW
7c673cae
FG
41 { return I(bl::denorm_min(), bl::denorm_min()); }
42private:
43 static I round_error(); // hide this on purpose, not yet implemented
44};
45
46} // namespace std
47
48
49#endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP