move BOOST_USING_STD_MIN and _MAX and BOOST_PREVENT_MACRO_SUBSTITUTION to the config headers, remove boost/minmax.hpp, update coding guidelines

[SVN r23313]
This commit is contained in:
Eric Niebler
2004-07-02 01:21:32 +00:00
parent 7203ad09bb
commit cf4e798691
3 changed files with 21 additions and 3 deletions

View File

@ -53,9 +53,6 @@
# include BOOST_PLATFORM_CONFIG
#endif
// used in various places to guard against the min/max macros
#define BOOST_PREVENT_MACRO_SUBSTITUTION
// get config suffix code:
#include <boost/config/suffix.hpp>

View File

@ -167,6 +167,15 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy;
# undef BOOST_HAS_HASH
#endif
//
// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
//
#if defined(__GNUC__) && (__GNUC__ < 3)
# include <algorithm> // for std::min and std::max
# define BOOST_USING_STD_MIN() ((void)0)
# define BOOST_USING_STD_MAX() ((void)0)
namespace boost { using std::min; using std::max; }
#endif
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)

View File

@ -285,6 +285,18 @@
namespace std { using ::ptrdiff_t; using ::size_t; }
# endif
// Workaround for the unfortunate min/max macros defined by some platform headers
#define BOOST_PREVENT_MACRO_SUBSTITUTION
#ifndef BOOST_USING_STD_MIN
# define BOOST_USING_STD_MIN() using std::min
#endif
#ifndef BOOST_USING_STD_MAX
# define BOOST_USING_STD_MAX() using std::max
#endif
// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
# ifdef BOOST_NO_STD_MIN_MAX