diff --git a/stl/CMakeLists.txt b/stl/CMakeLists.txt index ca28a3de6d3..b3297579ea0 100644 --- a/stl/CMakeLists.txt +++ b/stl/CMakeLists.txt @@ -584,7 +584,7 @@ function(add_stl_dlls D_SUFFIX REL_OR_DBG) # import library 'statics' add_library(msvcp${D_SUFFIX}_implib_objects OBJECT ${IMPLIB_SOURCES}) - target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL) + target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL _ENFORCE_ONLY_CORE_HEADERS) target_compile_options(msvcp${D_SUFFIX}_implib_objects PRIVATE /EHsc) # No /GL! target_stl_compile_options(msvcp${D_SUFFIX}_implib_objects ${REL_OR_DBG}) diff --git a/stl/src/locale0.cpp b/stl/src/locale0.cpp index 62d0fc647fb..42c67242c65 100644 --- a/stl/src/locale0.cpp +++ b/stl/src/locale0.cpp @@ -7,6 +7,8 @@ // MAJOR LIMITATIONS apply to what can be included here! // Before editing this file, read: /docs/import_library.md +#undef _ENFORCE_ONLY_CORE_HEADERS // TRANSITION, should be a core header + #include #include #include diff --git a/stl/src/nothrow.cpp b/stl/src/nothrow.cpp index d12dcdcf336..9124a1585a7 100644 --- a/stl/src/nothrow.cpp +++ b/stl/src/nothrow.cpp @@ -11,8 +11,10 @@ #undef MRTDLL #endif -#include -_STD_BEGIN +#include + +#include -const nothrow_t nothrow = nothrow_t(); // define nothrow +_STD_BEGIN +const nothrow_t nothrow = nothrow_t(); _STD_END