From 3cc0db15d17b191a51a304cf65c762fb805bccee Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 21 Jan 2001 05:37:41 +0000 Subject: [PATCH] removed use of for portability to raw GCC [SVN r8670] --- cast_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cast_test.cpp b/cast_test.cpp index 1602f16..e3ca7ea 100644 --- a/cast_test.cpp +++ b/cast_test.cpp @@ -9,13 +9,13 @@ // See http://www.boost.org for most recent version including documentation. // Revision History +// 20 Jan 01 removed use of for portability to raw GCC (David Abrahams) // 28 Jun 00 implicit_cast removed (Beman Dawes) // 30 Aug 99 value_cast replaced by numeric_cast // 3 Aug 99 Initial Version #include #include -#include #include # if SCHAR_MAX == LONG_MAX @@ -95,8 +95,8 @@ int main( int argc, char * argv[] ) // tests which should succeed long small_value = 1; long small_negative_value = -1; - long large_value = std::numeric_limits::max(); - long large_negative_value = std::numeric_limits::min(); + long large_value = LONG_MAX; + long large_negative_value = LONG_MIN; signed char c = 0; c = large_value; // see if compiler generates warning @@ -142,7 +142,7 @@ int main( int argc, char * argv[] ) if ( !caught_exception ) ++err_count; caught_exception = false; - try { numeric_cast( std::numeric_limits::max() ); } + try { numeric_cast( DBL_MAX ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #5\n"; caught_exception = true; } if ( !caught_exception ) ++err_count;