msvc.h 1.4 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 BHO_PREDEF_LIBRARY_STD_MSVC_H
  8. #define BHO_PREDEF_LIBRARY_STD_MSVC_H
  9. #include <asio2/bho/predef/library/std/_prefix.h>
  10. #include <asio2/bho/predef/version_number.h>
  11. #include <asio2/bho/predef/make.h>
  12. /* tag::reference[]
  13. = `BHO_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. `BHO_VERSION_NUMBER` will produce a version number that is directly comparable
  19. to `BHO_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 BHO_LIB_STD_MSVC BHO_VERSION_NUMBER_NOT_AVAILABLE
  29. #if defined(_MSVC_STL_VERSION)
  30. # undef BHO_LIB_STD_MSVC
  31. # define BHO_LIB_STD_MSVC BHO_PREDEF_MAKE_10_VVR_0PPPPP(_MSVC_STL_VERSION, _MSVC_STL_UPDATE)
  32. #endif
  33. #if BHO_LIB_STD_MSVC
  34. # define BHO_LIB_STD_MSVC_AVAILABLE
  35. #endif
  36. #define BHO_LIB_STD_MSVC_NAME "Microsoft stdlib"
  37. #endif
  38. #include <asio2/bho/predef/detail/test.h>
  39. BHO_PREDEF_DECLARE_TEST(BHO_LIB_STD_MSVC, BHO_LIB_STD_MSVC_NAME)