From 752c65be3520358bdbb6e5aee0d473086678586e Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 23 Jun 2004 04:49:48 +0000 Subject: [PATCH] remove std_min and std_max, update minmax coding guidelines [SVN r23162] --- include/boost/minmax.hpp | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/include/boost/minmax.hpp b/include/boost/minmax.hpp index c1f9aa6..9c4202f 100644 --- a/include/boost/minmax.hpp +++ b/include/boost/minmax.hpp @@ -15,38 +15,10 @@ #include // for std::min and std::max #include -namespace boost -{ +#define BOOST_USING_STD_MIN()\ + using std::min -template< typename T > -inline T const & std_min( T const & a, T const & b ) -{ - using std::min; - - return min BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b ); -} - -template< typename T > -inline T const & std_max( T const & a, T const & b ) -{ - using std::max; - - return max BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b ); -} - -// Overloads for unsigned long to work around a bug in the Borland headers -#ifdef __BORLANDC__ -inline unsigned long const & std_min( unsigned long const & a, unsigned long const & b ) -{ - return a < b ? a : b; -} - -inline unsigned long const & std_max( unsigned long const & a, unsigned long const & b ) -{ - return a > b ? a : b; -} -#endif - -} +#define BOOST_USING_STD_MAX()\ + using std::max #endif // BOOST_MINMAX_HPP