Add macro BOOST_MSSTL_VERSION

This commit is contained in:
Peter Dimov
2022-11-09 02:14:43 +02:00
parent 7b1f52c85e
commit 56e7a0e49d
2 changed files with 31 additions and 0 deletions

View File

@ -285,6 +285,36 @@
# define BOOST_DINKUMWARE_STDLIB 1
#endif
// BOOST_MSSTL_VERSION: as _MSVC_STL_VERSION, but for earlier releases as well
#if defined(_MSVC_STL_VERSION) // VS2017 (14.1) and above
# define BOOST_MSSTL_VERSION _MSVC_STL_VERSION
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 650 // VS2015 (14.0)
# define BOOST_MSSTL_VERSION 140
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 610 // VS2013 (12.0)
# define BOOST_MSSTL_VERSION 120
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 540 // VS2012 (11.0)
# define BOOST_MSSTL_VERSION 110
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 520 // VS2010 (10.0)
# define BOOST_MSSTL_VERSION 100
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 505 // VS2008SP1 (9.0)
# define BOOST_MSSTL_VERSION 91
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 503 // VS2008 (also 9.0)
# define BOOST_MSSTL_VERSION 90
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 405 // VS2005 (8.0)
# define BOOST_MSSTL_VERSION 80
#endif
//
#ifdef _CPPLIB_VER
# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
#else

View File

@ -1277,6 +1277,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_CLANG);
PRINT_MACRO(BOOST_CLANG_VERSION);
PRINT_MACRO(BOOST_LIBSTDCXX_VERSION);
PRINT_MACRO(BOOST_MSSTL_VERSION);
PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE);
PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0));
PRINT_MACRO(BOOST_CONSTEXPR);