Sha256: b863c3d936d76bfa33c45ba20a781285fbad604c6279ac858946e53e6db737e8

Contents?: true

Size: 1.65 KB

Versions: 50

Compression:

Stored size: 1.65 KB

Contents

// Copyright 2005-2009 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// On some platforms std::limits gives incorrect values for long double.
// This tries to work around them.

#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER)
#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER

#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif

#include <boost/limits.hpp>

// On OpenBSD, numeric_limits is not reliable for long doubles, but
// the macros defined in <float.h> are and support long double when STLport
// doesn't.

#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
#include <float.h>
#endif

namespace boost
{
    namespace hash_detail
    {
        template <class T>
        struct limits : std::numeric_limits<T> {};

#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
        template <>
        struct limits<long double>
             : std::numeric_limits<long double>
        {
            static long double epsilon() {
                return LDBL_EPSILON;
            }

            static long double (max)() {
                return LDBL_MAX;
            }

            static long double (min)() {
                return LDBL_MIN;
            }

            BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
            BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
            BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
#if defined(_STLP_NO_LONG_DOUBLE)
            BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX);
#endif
        };
#endif // __OpenBSD__
    }
}

#endif

Version data entries

50 entries across 50 versions & 3 rubygems

Version Path
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.4 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.3 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.2 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.1 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-6.0.0 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-5.3.7 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-5.3.6 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp
passenger-5.3.5 src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp