April 9th, 2026
heartcelebrate2 reactions

C++23 Support in MSVC Build Tools 14.51

Principal Engineering Manager

We’re pleased to provide an update on C++23 support in the Microsoft C++ (MSVC) Build Tools. This blog post will cover the feature additions in MSVC Build Tools version 14.51, including C++23 language features, libraries, and ISO C++ Core Working Group (CWG) and Library Working Group (LWG) Issue resolutions. We’ll also discuss the plans for completion of C++23 support in the MSVC compiler and how to make use of these latest feature updates.

C++23 Language Features

The following C++23 language features are now available under /std:c++23preview and /std:c++latest in the MSVC Build Tools 14.51 Preview. An update of the documentation on learn.microsoft.com to reflect these additions is scheduled before this version transitions to full support:

Compile-time evaluation

P2647R1 Static constexpr variables in constexpr functions

Static local variables can be declared at compile time:

constexpr char xdigit(int n)
{
  static constexpr char digits[] = "0123456789abcdef";
  return digits[n];
}

This reduces friction when marking existing functions as constexpr. Users will no longer see an error when evaluating the function at compile time, so the static variable gets to remain locally scoped. And because the variable has static storage duration, it is much easier to optimize the run time version of the function.

P2448R2 Relaxing some constexpr restrictions

The declaration of a constexpr function no longer fails if it’s decidedly unable to run at compile time.

void bar();

// Now accepted, but only executable at run time
constexpr void foo()
{
  bar();
}

This means foo can be marked as constexpr without being penalized for its definition. It can still be used at run time. At compile time, it will fail when attempting to call bar.

This also protects against scenarios where bar is owned by a library and changing its constexpr-ness could make foo ill-formed, regardless of how foo is used.

Unicode support

The following features are improvements to character encoding to better support Unicode and interoperability for C++.

P2029R4 Numeric and universal character escapes in literals

P2071R2 Named universal character escapes

P2314R4 Character sets and encodings

Other C++23 Features

P1774R8 Portable assumptions

P2324R2 Labels at the end of compound statements (C compatibility)

P2582R1 CTAD from inherited constructors (wording)

P2615R1 Meaningful exports

CWG Issue Resolutions

MSVC Build Tools 14.51 also resolves the following Core Working Group (CWG) issues:

CWG 2355 Deducing noexcept specifiers

CWG 2392 new-expression size checks and constant evaluation

CWG 2405 Additional type-dependent expressions

CWG 2479 Missing specifications for consteval and constinit

CWG 2484 char8_t / char16_t integral promotions

CWG 2490 Restrictions on destruction in constant expressions

CWG 2491 Export of typedef after first declaration

CWG 2518 Conformance requirements and #error / #warning

CWG 2529 Constant destruction of constexpr references

CWG 2538 Ignoring standard attributes syntactically

CWG 2539 Three-way comparison and floating-point strong ordering

CWG 2543 constinit and optimized dynamic initialization

CWG 2597 Replaceable allocation functions in the global module

CWG 2602 consteval defaulted functions

CWG 2605 Implicit-lifetime aggregates

CWG 2615 Missing __has_cpp_attribute(assume)

CWG 2618 Deduction excluding exception specifications

CWG 2627 Bit-fields and narrowing conversions

CWG 2631 Immediate function evaluation in default arguments

CWG 2640 Extended characters in n-character sequences

CWG 2651 Conversion function templates and noexcept

CWG 2664 CTAD deduction failure for alias templates

C++23 Library Features

On GitHub, the microsoft/STL repo tracks its status with a high level of detail:

  • The Changelog for MSVC Build Tools 14.51 records all of the features and fixes that are newly shipping in this version.
  • The STL C++23 Features project displays the status of all C++23 library features in the main branch.
  • The STL LWG Issues project does the same for Library Working Group issue resolutions.
  • The STL C++26 Features project does the same for C++26 library features.
    • Note that while we haven’t started accepting contributions for C++26 library features in general, a limited number of papers have been implemented unconditionally (as de facto “defect reports”, or bugfixes to the Standard). We’ve done this on a case-by-case basis, when changes are non-disruptive (e.g. adding new names in namespace std is potentially disruptive).

Notable library features that are newly available in MSVC Build Tools 14.51:

Other notable changes:

  • We’ve massively overhauled <regex> to fix long-standing correctness and performance problems that have been present since its initial implementation in VS 2008 SP1. After almost two decades, the stack overflows are finally fixed!
  • We’ve continued to add and improve SIMD-vectorized STL algorithms, using SSE4.2 and AVX2 for x64/x86, and (newly shipping in MSVC Build Tools 14.51) using NEON for ARM64/ARM64EC.
  • We’ve implemented 18 LWG issue resolutions.
  • We’ve removed long-deprecated non-Standard features, such as TR1, <hash_map>, <hash_set>, <experimental/filesystem>, stdext::checked_array_iterator, and stdext::unchecked_array_iterator.

All of this has been possible thanks to our amazing GitHub contributors.

MSVC Build Tools 14.52 Previews and remaining C++23 Features

At this point, we have two remaining features for completion of support for C++23. Both of these features are in-progress and will land in an upcoming MSVC Build Tools 14.52 Preview update.

P2564R3 consteval needs to propagate up

P0533R9 constexpr <cmath>

Completion of C++23 and /std:c++23

Once the remaining C++23 features are completed, the /std:c++23 switch will be added in upcoming MSVC Build Tools 14.52 Preview releases. At that point in time, /std:c++23preview will be deprecated.

Full support for /std:c++23 will begin once MSVC Build Tools 14.52 becomes the default (non-Preview) version in a Visual Studio 2026 Insiders release. Please see New release cadence and support lifecycle for Microsoft C++ Build Tools – C++ Team Blog for additional details.

IntelliSense Support

C++23 IntelliSense support in Visual Studio 2026 is still in progress in time for MSVC Build Tools 14.52 becoming the default MSVC Build Tools version in Visual Studio 2026

Conclusion

We’ve recently made major changes to our release processes, which will enable us to ship fixes and updates to MSVC Build Tools Previews with greater frequency (approximately weekly) than before.

Please try out the new MSVC Build Tools 14.51 Preview features . We’d love your feedback on these features using the /std:c++23preview switch.

Your feedback can help us address any bugs and improve build and runtime performance. To submit feedback, use the Help > Send Feedback menu from the IDE, or navigate directly to Visual Studio Developer Community. For the STL, specifically, please report feedback directly to us on the STL GitHub (https://github.com/microsoft/STL/issues).

Finally, I would like to thank Stephan T. Lavavej and RanDair Porter for their content contributions to this blog post.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Category

Author

Daniel Griffing
Principal Engineering Manager

0 comments