From 3ae6668b44232b1b16b93c8b7f53bac5f11ff81c Mon Sep 17 00:00:00 2001 From: David Deakins Date: Wed, 8 Apr 2009 16:38:38 +0000 Subject: [PATCH] After including to check for usage of STLport, if STLport is not detected, then include to detect other std libs. This avoids the issue that some std libs do not include all of their C++-related macros when just is included. Related to issue #2924. [SVN r52262] --- include/boost/config/select_stdlib_config.hpp | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/include/boost/config/select_stdlib_config.hpp b/include/boost/config/select_stdlib_config.hpp index 71a7a06a..9c970667 100644 --- a/include/boost/config/select_stdlib_config.hpp +++ b/include/boost/config/select_stdlib_config.hpp @@ -11,12 +11,9 @@ // locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: -// we need to include a std lib header here in order to detect which -// library is in use, use as it's one of the smaller std lib headers -// - do not rely on this header being included - -// users can short-circuit this header if they know whose std lib -// they are using. - +// First include to determine if some version of STLport is in use as the std lib +// (do not rely on this header being included since users can short-circuit this header +// if they know whose std lib they are using.) #include #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) @@ -25,7 +22,17 @@ // can end up detecting that first rather than STLport: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" -#elif defined(__LIBCOMO__) +#else + +// If our std lib was not some version of STLport, then include as it is about +// the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not +// include their C++-related macros in so this additional include makes sure +// we get those definitions) +// (again do not rely on this header being included since users can short-circuit this +// header if they know whose std lib they are using.) +#include + +#if defined(__LIBCOMO__) // Comeau STL: #define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" @@ -64,5 +71,7 @@ #endif +#endif +