1.1 --- a/epoc32/include/stdapis/boost/numeric/conversion/bounds.hpp Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/stdapis/boost/numeric/conversion/bounds.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -7,52 +7,18 @@
1.4 //
1.5 // Contact the author at: fernando_cacciola@hotmail.com
1.6 //
1.7 -#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
1.8 -#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
1.9 +#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
1.10 +#define BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
1.11
1.12 -#include "boost/limits.hpp"
1.13 -#include "boost/config.hpp"
1.14 -#include "boost/mpl/if.hpp"
1.15 +#include "boost/numeric/conversion/detail/bounds.hpp"
1.16
1.17 -namespace boost { namespace numeric { namespace boundsdetail
1.18 +namespace boost { namespace numeric
1.19 {
1.20 - template<class N>
1.21 - class Integral
1.22 - {
1.23 - typedef std::numeric_limits<N> limits ;
1.24
1.25 - public :
1.26 -
1.27 - static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
1.28 - static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
1.29 - static N smallest() { return static_cast<N>(1); }
1.30 - } ;
1.31 +template<class N>
1.32 +struct bounds : boundsdetail::get_impl<N>::type
1.33 +{} ;
1.34
1.35 - template<class N>
1.36 - class Float
1.37 - {
1.38 - typedef std::numeric_limits<N> limits ;
1.39 -
1.40 - public :
1.41 -
1.42 - static N lowest () { return static_cast<N>(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; }
1.43 - static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
1.44 - static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
1.45 - } ;
1.46 -
1.47 - template<class N>
1.48 - struct get_impl
1.49 - {
1.50 - typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ;
1.51 -
1.52 - typedef Integral<N> impl_int ;
1.53 - typedef Float <N> impl_float ;
1.54 -
1.55 - typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ;
1.56 - } ;
1.57 -
1.58 -} } } // namespace boost::numeric::boundsdetail.
1.59 +} } // namespace boost::numeric
1.60
1.61 #endif
1.62 -//
1.63 -///////////////////////////////////////////////////////////////////////////////////////////////