os/ossrv/ossrv_pub/boost_apis/boost/numeric/interval/limits.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/* Boost interval/limits.hpp template implementation file
sl@0
     2
 *
sl@0
     3
 * Copyright 2000 Jens Maurer
sl@0
     4
 * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
sl@0
     5
 *
sl@0
     6
 * Distributed under the Boost Software License, Version 1.0.
sl@0
     7
 * (See accompanying file LICENSE_1_0.txt or
sl@0
     8
 * copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
     9
 */
sl@0
    10
sl@0
    11
#ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP
sl@0
    12
#define BOOST_NUMERIC_INTERVAL_LIMITS_HPP
sl@0
    13
sl@0
    14
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
sl@0
    15
sl@0
    16
#include <boost/config.hpp>
sl@0
    17
#include <boost/limits.hpp>
sl@0
    18
#include <boost/numeric/interval/detail/interval_prototype.hpp>
sl@0
    19
sl@0
    20
namespace std {
sl@0
    21
sl@0
    22
template<class T, class Policies>
sl@0
    23
class numeric_limits<boost::numeric::interval<T, Policies> >
sl@0
    24
  : public numeric_limits<T>
sl@0
    25
{
sl@0
    26
private:
sl@0
    27
  typedef boost::numeric::interval<T, Policies> I;
sl@0
    28
  typedef numeric_limits<T> bl;
sl@0
    29
public:
sl@0
    30
  static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); }
sl@0
    31
  static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); }
sl@0
    32
  static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); }
sl@0
    33
sl@0
    34
  BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
sl@0
    35
  BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
sl@0
    36
sl@0
    37
  static I infinity () throw() { return I::whole(); }
sl@0
    38
  static I quiet_NaN() throw() { return I::empty(); }
sl@0
    39
  static I signaling_NaN() throw()
sl@0
    40
  { return I(bl::signaling_NaN(), bl::signaling_Nan()); }
sl@0
    41
  static I denorm_min() throw()
sl@0
    42
  { return I(bl::denorm_min(), bl::denorm_min()); }
sl@0
    43
private:
sl@0
    44
  static I round_error();    // hide this on purpose, not yet implemented
sl@0
    45
};
sl@0
    46
sl@0
    47
} // namespace std
sl@0
    48
sl@0
    49
#endif
sl@0
    50
sl@0
    51
#endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP