Compare commits

..

1 Commits

Author SHA1 Message Date
nobody 795785cfa7 This commit was manufactured by cvs2svn to create tag
'Version_1_20_2'.

[SVN r9073]
2001-02-10 14:52:07 +00:00
2 changed files with 7 additions and 6 deletions
-1
View File
@@ -16,7 +16,6 @@
#include <iostream>
#include <climits>
#include <cfloat> // for DBL_MAX (Peter Schmid)
#include <boost/cast.hpp>
# if SCHAR_MAX == LONG_MAX
+7 -5
View File
@@ -9,10 +9,6 @@
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included
// <boost/limits.hpp> instead (the workaround did not
// actually compile when BOOST_NO_LIMITS was defined in
// any case, so we loose nothing). (John Maddock)
// 21 Jan 01 Undid a bug I introduced yesterday. numeric_cast<> never
// worked with stock GCC; trying to get it to do that broke
// vc-stlport.
@@ -47,7 +43,9 @@
# include <cassert>
# include <typeinfo>
# include <boost/type.hpp>
# include <boost/limits.hpp>
# ifndef BOOST_NO_LIMITS
# include <limits>
# endif
// It has been demonstrated numerous times that MSVC 6.0 fails silently at link
// time if you use a template function which has template parameters that don't
@@ -268,6 +266,7 @@ namespace boost
# pragma option push -w-8041
# endif
# ifndef BOOST_NO_LIMITS
// Move to namespace boost in utility.hpp?
template <class T>
struct fixed_numeric_limits : public std::numeric_limits<T>
@@ -278,6 +277,7 @@ namespace boost
? T(-std::numeric_limits<T>::max()) : std::numeric_limits<T>::min();
}
};
# endif // BOOST_NO_LIMITS
# if BOOST_MSVC
# pragma warning(pop)
@@ -291,9 +291,11 @@ namespace boost
template<typename Target, typename Source>
inline Target numeric_cast(Source arg BOOST_EXPLICIT_DEFAULT_TARGET)
{
#ifndef BOOST_NO_LIMITS
// typedefs abbreviating respective trait classes
typedef std::numeric_limits<Source> arg_traits;
typedef detail::fixed_numeric_limits<Target> result_traits;
#endif
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
// typedefs that act as compile time assertions