Skip to content

Files To Edit When Adding Or Removing Files

Stephan T. Lavavej edited this page Jun 9, 2026 · 35 revisions

The following are lists of files that need to be updated whenever we add a header file or source file to the STL.

  • "Headers" are consumed directly or indirectly by users. Headers can be public, which means we intend for customers to include them directly and we consider their names and contents contractual, like <vector>. We also have private headers which are internal implementation details, like <xutility>.
  • "Sources" are compiled into msvcp140.dll/libcpmt.lib/etc. For example, filesystem.cpp and xmath.hpp.

Adds, renames, and deletes are handled identically, except that the IDE's list of extensionless headers should generally never stop mentioning names.

This GitHub Repo

  • stl/CMakeLists.txt
    • When adding headers or sources, so that the build system picks them up.
  • stl/msbuild/stl_base/stl.files.settings.targets
    • When adding sources, so that the legacy build system picks them up.
  • stl/inc/__msvc_all_public_headers.hpp
    • When adding public headers, so that customers who are using this header as a way to test all the standard library headers are actually testing all the standard library headers. Note that this has separate sections for core and non-core headers.
  • stl/inc/header-units.json
    • When adding headers, so that the compiler's /translateInclude will automatically translate from #include <meow> to import <meow>;. (Both public headers and private headers should be listed here.)
  • stl/modules/std.ixx
    • When adding Standard public headers, add them to the std module here. (This will automatically add them to the std.compat module.)
  • tests/std/tests/include_each_header_alone_matrix.lst
    • When adding public headers, this test makes sure each header can be included by itself and that we don't have any accidental internal dependencies.
  • tests/std/tests/P1502R1_standard_library_header_units/importable_cxx_library_headers.jsonc
  • tests/std/tests/P1502R1_standard_library_header_units/test.cpp
  • tests/std/include/test_header_units_and_modules.hpp
    • When adding Standard public headers, add test coverage for Standard Library Header Units and Modules.

MSVC Internal Repo

  • src/SetupPackages/swix/modern/Microsoft.VisualCpp.CRT.Headers.swixproj
    • Update this list to get new headers picked up by the Visual Studio installers. It has a wildcard for *.hpp.
  • src/SetupPackages/swix/modern/Microsoft.VisualCpp.CRT.Source.swixproj
    • Update this list to get new sources picked up by the Visual Studio installers. It has wildcards for *.cpp and *.hpp.
  • src/vctools/crt/copy_crt/copy_crt_early.vcxproj
    • When adding headers, this is used by parts of the build that consume the "live" headers.
  • src/qa/VC/FE/compiler/tests/cxx/modules/dependency-scanning/header-units/deps.cpp
  • src/qa/VC/FE/compiler/tests/cxx/modules/dependency-scanning/header-units/stl-header-units.dat
    • When adding headers to header-units.json, this provides test coverage.
  • infra/nuget/*.nuspec.template
    • When adding headers, update the files in this directory. Use rg bitset -g "infra/nuget/*.nuspec.template" to search for precedent.

VS Internal Repo

  • src/vc/designtime/pkg/src/VC_Pkg_Core_Registration.pkgdef
  • src/vc/designtime/TextMate/cpp.tmLanguage.json

Clone this wiki locally