C++ Language Updates in MSVC Build Tools v14.50It has been some time since we have provided an update on MSVC progress, and this one comes with the latest major update to our IDE: Visual Studio 2026 version 18.0. This version of Visual Studio ships with the MSVC Build Tools version 14.50, which includes version 19.50 of the MSVC compiler. You can try out the improvements by downloading the Insiders release. Also, if you want to track updates in the Standard Library, check out the STL Changelog, which is regularly updated. Let’s jump right into the updates!C++23 FeaturesAs C++ standards progress in MSVC, you can follow along using the cppreference compiler support table and help us identify what we should be working on next! P0849R8 (auto(x): decay-copy in the language)// Prior to P0849R8:void pop_front_alike(auto& x) { using T = std::decay_t; std::erase(x, T(x.front()));}// After P0849R8:void pop_front_alike(auto& x) { std::erase(x, auto(x.front()));} P2437R1 Implement C++23 #warning// Valid prior to C++23.#error bad configuration...// Valid after C++23.#warning configuration deprecated... CWG Issue 2586 (Explicit object parameter for assignment and comparison)struct S { S& operator=(this S&, const S&) = default; // Valid after CWG2586. auto operator(this const S&, const S&) = default; // Valid after CWG2586.}; P2280R4, allowing references to unknown values during constant evaluationtemplate constexpr size_t array_size(T (&)[N]) { return N;}void check(int const (¶m)[3]) { constexpr auto s2 = array_size(param); // Previously ill-formed, now accepted as a constant expression after P2280R4.}Smaller Conformance Updates CWG2635 - Constrained structured bindings. CWG2465 (Coroutine parameters passed to a promise constructor) P2360R0 which extends the definition of an init-statement to allow an alias-declaration CWG2496 - ref-qualifiers and virtual overriding. CWG2506: Structured bindings and array cv-qualifiers. CWG2507 (default arguments for operator[]). CWG2585: No change required to behavior. P2290R3 C++23 Hex/oct delimited escape sequence support in string literals. CWG2521 which deprecates 'operator string-literal identifier'. CWG2528 which relaxes conversion rules for the spaceship operator. P2797R0: Proposed resolution for CWG2692 Static and explicit object member functions with the same parameter-type-lists. Implement a warning to notify of the enum type change caused by /Zc:enumTypes.Compiler Improvements in v14.50C++/CLI Fix ICE on use of 'auto' in member declarations in C++/CLI managed types static constexpr causes C++/CLI compiler crash Compiler crashes: A managed type cannot have any friend functions/classes/interfaces Fix crash in compiler in C++/CLI code using ref-types on stack cl.exe terminates with error code -529706956 Visual Studio 17.12 introduced multiple errors while building managed C++ code in an MFC applicationDiagnostics Fix an incorrect diagnostic about implicit enum type conversions in C even when the code explicitly converts the expression "warning C5287: operands are different enum types" even with an explicit castconstexpr Fixes several errors involving virtual function calls at compile-time. MSVC erroneously claims the return value of a virtual constexpr function-call operator is not a constant expression C++20 constexpr virtual polymorphism is broken in MSVC but works in ClangCL and intellisense Virtual constexpr function did not evaluate to a constant Unable to use virtual function in constexpr expression constexpr should reject overflow from addition and left shifting of constants Signed overflow in core constant expression should not be allowed in all cases Fix scenarios where constructors should be made implicitly constexpr Multiple constexpr bugs (including regresions) Fixes scenario when initializing a constexpr variable with a consteval call Multiple constexpr bugs (including regresions) Fix an issue with constexpr static data members and the CRTP. CRTP in MSVC 19.24 not seeing variable Static constexpr member of CRTP base class not seen Fixes a bug related to evaluating destructors of constant objects too early; objects appeared at runtime to be in their destroyed state. MSVC 14.37-40 forces my global std::string to be constinit; constinit strings don't survive intact Fix an issue with constexpr lambda captures and guaranteed copy elision with a compiler generated call to memset. Lambda in a function template requests capturing a constexpr variable which is not odr-used Allow consteval constructor calls as argument of direct-initialization. MSVC Fails to compile list and direct initialization in C++20 when member constructor is consteval Fixed an issue where calling certain consteval functions in an if consteval would sometimes produce a compiler error. The consteval function is not an immediate function under if consteval Allow constexpr references to be initialized with derived class rvalue. Downcasting constexpr instance with static_cast not valid in constant expression wrong code bug in constexpr evaluationC++ Modules Fix bug with importing friend declaration where the class-head-name was in a particular qualified-id form, encountered in nlohmann/json library. nlohmann/json does not compile as C++20 module Fix compiler crash when using-declarations are used from a specialization inside a module. Internal compiler error when using "using" declaration with template base class in module fragments Fix an issue that std::expected can't be specialized in some cases when imported from a module. C1907 modules, constexpr and std::expected Fixed an issue where functions using types from a named module would sometimes not execute properly or cause linker failures. Compiler uses non-exported class definition from wrong module (C++20) Fix issue when importing a constexpr function with static local variables ICE when calling imported function that returns local static container data Fixed an issue where the compiler would sometimes not respect a #pragma warning(disable:...) when the pragma appeared in a module or header unit. #pragma warning(disable) not working in nested headers used with header units Fixed various issues preventing Unreal Engine 5 from building with header units. Unreal does not build with header units enabled C++ modules compiler error: Base class undefined C++20 modules + boost::asio still being weird C++20 modules: specialzations in the global module fragment are discarded even if they are decl-rechableConformance Add support for '[[maybe_unused]]' on labels and fix an issue where warning C4102 (unreferenced label) was being emitted when the only reference was from a discarded branch of an if-constexpr statement. "unreferenced label" when ref hidden by "if constexpr" Diagnose ill-formed friend explicit specializations that were incorrectly accepted in C++20 or later. Defining explicit function template specialization in friend declaration is wrongly permitted Fix an issue with the compiler allowing specifiers (other than type-specifiers) as part of a type-id [accepts invalid] cl will accept constexpr template arguments Add a switch, '/Zc:enumEncoding', to correctly encode the use of an enumeration as a non-type template parameter. Overload resolution fails for enum non-type template parameters Fix an issue in which the compiler did not issue a diagnostic if a user did not prepend a dependent template-id with the 'template' keyword. No diagnostic for missing .template in dependent names Fix an issue with the compiler allowing specifiers (other than type-specifiers) as part of a type-id [accepts invalid] cl will accept constexpr template argumentsReliability Fix an ICE when explicitly instantiating a class template which has friend functions. Internal compiler error (ICE) on explicit class instantiation new to VS 2022 17.14 Fix an ICE involving explicit variable template instantiations when PCH files are used. C++ explicit variable template instantiation causes internal compiler error when using precompiled header Fix a compiler crash involving deep nesting of aggregates, non-aggregates, and initializer lists Internal Compiler Error Found in MSVC 14.44.35207 Fix an issue with nested generic lambdas and an issue with using 'template' in a qualified-id VS 17.14 Preview 3.0: ICE: error C1001: Internal compiler error. 17.14 Preview 3 Internal compiler error Fixes internal compiler error when elaborating a struct with the same name as overloaded member functions Template Internal Compiler Error Fixed a logic error that caused an exponential growth in memory usage during type deduction if a class type had a lot of base classes VS 2022 C++ compiler uses nearly 200x as much memory as VS 2019 compiler Fix an issue with the IL we generate for a temporary that it bound to a non-static data member of reference type. CL.exe crashes with Access Violation on specific code involving references Fix a compiler ICE when the nested lambda inside a generic lambda references a qualified name. VS 17.14 ICE with a very particular function template Fixed an ICE after error when the compiler saw an if constexpr with empty condition. Internal compiler error parsing invalid if constexpr Fix a compiler crash associated with initializing a bit field. Internal compiler error in VS2022 17.10+ Fix an issue with the compiler complaining about an ill-formed pure-specifier within a function template Erroneous reporting of C5288 with class defined in function template in MSVC 14.44.35207 Fix a compiler ICE when the nested lambda inside a generic lambda references a captured variable. ICE with nested std::visit + lambda captures Fix crash when comma missing between designated initializers Internal compiler error with designated initializer in lambda Fixes a compiler crash with initialization of aggregates involving commas and initializer lists. Internal Compiler Error Found in MSVC 14.44.35207 Fix an issue with lambdas and non-type template parameters whose type is a pointer-to-member. Internal Compiler Error (ICE) on function returning closure object Correct bad code generation for certain templated conversion operators Wrong code generation in use of templated conversion operator with explicit object parameter Fix an internal compiler error during initialization of nested aggregates with initializer lists Internal Compiler Error Found in MSVC 14.44.35207 ICE when trying to access not captured pointer in lambda fatal error C1001: Internal compiler error.Correctness Fix an issue with exception handling and unions; and an issue with the handling of an rvalue reference in the context of a lambda. Internal compiler error when compiling C++17 code using union and std::array When using a lambda as a template argument for a callback, the reference is not correctly bound. Fix an issue when explicit instantiation sometimes picks the wrong overload which has a requires clause. Overload resolution for constrained function templates confused by explicit instantiation Fix an issue with '/d1initAll' and arrays of structs. /d1initall1023 /d1initAll:FillPatternE2 options causes incorrect initialization results in constant evaluation Correct some semantic issues with noexcept specifiers and compile errors for some noexcept specifiers on member functions. noexcept for some reason work with type noexcept doesn't wants to work with operator type cast [C++] Post-increment operator cannot refer to this pointer in noexcept specifier Fix an issue with phase-1 name binding in a non-static data member initializer Wrong context for class field initializer Fix an incorrect value category for expressions involving indirections and arrays. cl Preview fails to properly determine assignment of a prvalue Fix a syntax error when parsing certain template-ids in alias declarations inside some templates. Source code parsing error in boost.parser in 17.14 Preview Fix an issue with partial ordering and template parameter objects Template Specialization is not selected when passing out-of-line Lambda NTTP Fix a bad error C2355 on 'this' in a local class declaration. C2355 is wrongly triggered when local class is defined in a static member function Fix an issue with the re-declaration of constexpr variables and an issue with parsing a bit-field width within a partial specialization of a class template. A C1001 error occurs in VS17.14 Code does not compile with MSVC Fix an issue causing __declspec(no_sanitize_address) to be ignored on lambdas and forward-declared functions. Address Sanitizer declspecs/attributes do not behave consistently across compilers Fix incorrect point of instantiation when an inline static data member has a class template specialization type. static inline atomic and another atomic generate warning C4744 in Release configuration Fix an issue when a static operator() was also an abbreviated function template. Call to static operator() is elided Fix an issue with no_unique_address and class types with common subobjects. [[[msvc::no_unique_address]] incorrectly optimizes mixed structs with leading nested empty struct](https://developercommunity.visualstudio.com/t/msvc::no_unique_address-fails-to-opt/10892814) Fix an issue with template template parameters and default template arguments VS2022 VC++ default template parameter derivation error causes the result to be inconsistent with expectations Fix incorrect resolution of a name referring to the enclosing class template. MSVC Fails to compile friend function template whose template constraint (C++20) contains the enclosing class template Fix an issue causing error C2106 on certain member-access expressions that should be lvalues. After updating VS2022 to 17.14 C++ compiler is giving me an error about lvalue and ending up with ICE (open source code) Fixed an issue where decltype would sometimes return the wrong type when used with ternary expressions. conditional operator gives wrong result type if both operands are static_cast to prvalue pointer type Fix 1) an issue with C++23 multi-dimensional array indexing; 2) an issue with allowing '[[maybe_unused]]' on a label; and 3) an issue with the compiler being too eager to instantiate a specialization of a function template. Multidimensional operator[] with /Wall reports bogus warning C4548 Discarded statement instantiated in a generic lambda Fix an issue with C4100 (unreferenced parameter) and abbreviated function template; and an issue with a missing warning for using a comma operator in subscript expression Bogus C4100 "unreferenced formal parameter" warning with if constexpr in static member function template of a class template Fix spurious unreferenced variable warning for OpenMP private loop variable. Incorrect C4101 OpenMP compiler warning in 17.8.0 Fix issues with 'std::bit_cast', integral non-type template parameters and instantiation of variable templates. __builtin_bit_cast Internal compiler error Issue in specific conditions with modulo operator in variadic template with "/permissive-" after version 19.32. Fix spurious warning C4193 when compiling some preprocessed files Incorrect C4193 with /std:c++20 Fix a missing error when aggregate initialization is incorrectly used during class template argument deduction. Deduction of class template arguments picks up wrong constructor Fix determination of value category for certain kinds of expressions involving a sub-expression that is a conditional expression. Class member's array's element is not an l-value in a ternary expression Fix an issue with an elaborated class-specifier in a template argument list [Unreal Engine] Template compile error regression with msvc 14.42 Fix an issue with operator binding and an issue with binding local class types. [Unreal Engine] Template compile error with msvc 14.44 Fix a couple of issue related to using enum declarations. using enum c++ 20 doesnt supported as well MSVC does not compile a function type with multiple parentheses Defining class method outside the class, with concept Variable Declaration Allowed Inside Switch Case Without Scoping Operator No warning C4706 for assignment to std::unqiue_ptr used as a condition VS 17.14. "if constexpr (requires " doesn't work correctly Incorrect overload resolution for static operator() Lvalue-to-rvalue conversion rules for std::nullptr_t are violated Error message depends on unused parameter pack In-class initialization of pointer-to-member + virtual function make MSVC to compile incorrectly MSVC Compiler Bug: requires Constraint Fails to Remove Non-Matching Template Candidates, Leading to Compilation Error Regression: c++ compilation failure in code generated by Qt's meta object compiler Rejects valid pack expansion in base specifier in lambda bodyCorrectness (C compiler) In C23, don't decay functions to function pointers when used as an argument to typeof typeof not working with function typesClosingAs always, we welcome your feedback. Feel free to send any comments through e-mail at visualcpp@microsoft.com, through Twitter @visualc, or through BlueSky @msftcpp.bsky.social. Also, feel free to follow Cameron DaCamara on Twitter @starfreakclone.If you encounter other problems with MSVC in Visual Studio 2026 please let us know via the Report a Problem option, either from the installer or the Visual Studio IDE itself. For suggestions or bug reports, let us know through Developer Community.