Skip to content

Macro _MSVC_STL_UPDATE

Stephan T. Lavavej edited this page Mar 2, 2022 · 37 revisions

We've implemented the Standard's feature-test macros, which are the best way to determine whether a feature is supported by your current combination of compiler vendor, compiler version, library vendor, library version, and build settings. However, it can occasionally be useful to query the library version directly. We provide an implementation-specific macro _MSVC_STL_UPDATE defined in the STL's central internal header yvals_core.h; users should include <version> or any other Standard header to get this macro. This macro follows the year-month format of Standard feature-test macros, but isn't related to any of them. We simply intend to update the value of _MSVC_STL_UPDATE every month, so when a Visual Studio update ships, it captures a new value.

Here are the historical values of this macro, verified from actual installations of released (non-preview) Visual Studio updates:

Toolset Version Visual Studio _MSVC_STL_UPDATE Notes
19.11 and earlier earlier none
19.12 VS 2017 15.5 201709
19.13 VS 2017 15.6 201711
19.14 VS 2017 15.7 201803
19.15 VS 2017 15.8 201806L
19.16 VS 2017 15.9 201809L
19.20 VS 2019 16.0 201811L
19.21 VS 2019 16.1 201903L
19.22 VS 2019 16.2 201905L
19.23 VS 2019 16.3 201906L
19.24 VS 2019 16.4 201909L
19.25 VS 2019 16.5 201912L
19.26 VS 2019 16.6 202002L
19.27 VS 2019 16.7 202005L
19.28 VS 2019 16.8 202008L
19.28 VS 2019 16.9 202011L _MSC_VER remained 1928
19.29 VS 2019 16.10 202104L _MSC_VER increased
19.29 VS 2019 16.11 202104L Macros unchanged, contained only #1929 in 16.11.0 and #2060 in 16.11.4
19.30 VS 2022 17.0 202108L
19.31 VS 2022 17.1 202111L
Clone this wiki locally