Sha256: c0ef0270bfc67f6b687bcd02a9c2e85a46f619203a0c4194b812a9f427bb9603

Contents?: true

Size: 1.78 KB

Versions: 143

Compression:

Stored size: 1.78 KB

Contents

//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
//  Use, modification, and distribution is subject to 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)

//  See library home page at http://www.boost.org/libs/numeric/conversion
//
// Contact the author at: fernando_cacciola@hotmail.com
// 
#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP

#include "boost/limits.hpp"
#include "boost/config.hpp"
#include "boost/mpl/if.hpp"

namespace boost { namespace numeric { namespace boundsdetail
{
  template<class N>
  class Integral
  {
      typedef std::numeric_limits<N> limits ;

    public :
    
      static N lowest  () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
      static N smallest() { return static_cast<N>(1); }
  } ;

  template<class N>
  class Float
  {
      typedef std::numeric_limits<N> limits ;

    public :
    
      static N lowest  () { return static_cast<N>(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; }
      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
      static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
  } ;

  template<class N>
  struct get_impl
  {
    typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ;

    typedef Integral<N> impl_int   ;
    typedef Float   <N> impl_float ;

    typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ;
  } ;

} } } // namespace boost::numeric::boundsdetail.

#endif
//
///////////////////////////////////////////////////////////////////////////////////////////////

Version data entries

143 entries across 143 versions & 3 rubygems

Version Path
passenger-6.0.26 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.25 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/bounds.hpp