msvc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. Copyright Henrik S. Gaßmann 2023
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_PREDEF_LIBRARY_STD_MSVC_H
  8. #define BOOST_PREDEF_LIBRARY_STD_MSVC_H
  9. #include <boost/predef/library/std/_prefix.h>
  10. #include <boost/predef/version_number.h>
  11. #include <boost/predef/make.h>
  12. /* tag::reference[]
  13. = `BOOST_LIB_STD_MSVC`
  14. https://github.com/microsoft/STL[Microsoft's {CPP} Standard Library].
  15. If available version number as major, minor, and patch.
  16. The patch number is derived from `_MSVC_STL_UPDATE` by taking its five last
  17. digits (see below). This implies that pasting a `_MSVC_STL_UPDATE` value into
  18. `BOOST_VERSION_NUMBER` will produce a version number that is directly comparable
  19. to `BOOST_LIB_STD_MSVC`.
  20. [options="header"]
  21. |===
  22. | {predef_symbol} | {predef_version}
  23. | `+_MSVC_STL_VERSION+` | {predef_detection}
  24. | `+_MSVC_STL_VERSION+` | VV.R.0
  25. | `+_MSVC_STL_UPDATE+` | 00.0.0YYYMM
  26. |===
  27. */ // end::reference[]
  28. #define BOOST_LIB_STD_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  29. #if defined(_MSVC_STL_VERSION)
  30. # undef BOOST_LIB_STD_MSVC
  31. # define BOOST_LIB_STD_MSVC BOOST_PREDEF_MAKE_10_VVR_0PPPPP(_MSVC_STL_VERSION, _MSVC_STL_UPDATE)
  32. #endif
  33. #if BOOST_LIB_STD_MSVC
  34. # define BOOST_LIB_STD_MSVC_AVAILABLE
  35. #endif
  36. #define BOOST_LIB_STD_MSVC_NAME "Microsoft stdlib"
  37. #endif
  38. #include <boost/predef/detail/test.h>
  39. BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSVC, BOOST_LIB_STD_MSVC_NAME)