From 5a253182c2850c36cf0dcd74295a2200f1bf2c2f Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Sun, 29 Feb 2004 17:46:07 +0000 Subject: [PATCH] make std_min play nice with the Borland headers [SVN r22410] --- include/boost/minmax.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/boost/minmax.hpp b/include/boost/minmax.hpp index cde0a88..b5795cf 100644 --- a/include/boost/minmax.hpp +++ b/include/boost/minmax.hpp @@ -46,6 +46,19 @@ inline T const & std_max( T const & a, T const & b ) 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 + } #endif // BOOST_MINMAX_HPP