{"id":35720,"date":"2025-09-10T13:51:18","date_gmt":"2025-09-10T13:51:18","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=35720"},"modified":"2025-10-14T20:17:41","modified_gmt":"2025-10-14T20:17:41","slug":"c-language-updates-in-msvc-build-tools-v14-50","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/c-language-updates-in-msvc-build-tools-v14-50\/","title":{"rendered":"C++ Language Updates in MSVC Build Tools v14.50"},"content":{"rendered":"<h3>C++ Language Updates in MSVC Build Tools v14.50<\/h3>\n<p>It 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: <strong>Visual Studio 2026 version 18.0<\/strong>. This version of Visual Studio ships with the <strong>MSVC Build Tools version 14.50<\/strong>, which includes version 19.50 of the MSVC compiler. You can try out the improvements by <a href=\"https:\/\/aka.ms\/vspreview\">downloading the Insiders release<\/a>. Also, if you want to track updates in the Standard Library, check out the <a href=\"https:\/\/github.com\/microsoft\/STL\/wiki\/Changelog\">STL Changelog<\/a>, which is regularly updated. Let\u2019s jump right into the updates!<\/p>\n<h2>C++23 Features<\/h2>\n<p>As C++ standards progress in MSVC, you can follow along using the <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/compiler_support.html\">cppreference compiler support table<\/a> and help us identify what we should be working on next!<\/p>\n<ul>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2021\/p0849r8.html\">P0849R8<\/a> (auto(x): decay-copy in the language)<\/li>\n<\/ul>\n<pre class=\"prettyprint language-cpp\"><code class=\"language-cpp\">\/\/ Prior to P0849R8:\r\nvoid pop_front_alike(auto&amp; x) {\r\n    using T = std::decay_t&lt;decltype(x.front())&gt;;\r\n    std::erase(x, T(x.front()));\r\n}\r\n\r\n\/\/ After P0849R8:\r\nvoid pop_front_alike(auto&amp; x) {\r\n    std::erase(x, auto(x.front()));\r\n}\r\n<\/code><\/pre>\n<ul>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2022\/p2437r1.pdf\">P2437R1<\/a> Implement C++23 <code>#warning<\/code><\/li>\n<\/ul>\n<pre class=\"prettyprint language-cpp\"><code class=\"language-cpp\">\/\/ Valid prior to C++23.\r\n#error bad configuration...\r\n\/\/ Valid after C++23.\r\n#warning configuration deprecated...\r\n<\/code><\/pre>\n<ul>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2586\">CWG Issue 2586<\/a> (Explicit object parameter for assignment and comparison)<\/li>\n<\/ul>\n<pre class=\"prettyprint language-cpp\"><code class=\"language-cpp\">struct S {\r\n  S&amp; operator=(this S&amp;, const S&amp;) = default; \/\/ Valid after CWG2586.\r\n  auto operator&lt;=&gt;(this const S&amp;, const S&amp;) = default; \/\/ Valid after CWG2586.\r\n};\r\n<\/code><\/pre>\n<ul>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2022\/p2280r4.html\">P2280R4<\/a>, allowing references to unknown values during constant evaluation<\/li>\n<\/ul>\n<pre class=\"prettyprint language-cpp\"><code class=\"language-cpp\">template &lt;typename T, size_t N&gt;\r\nconstexpr size_t array_size(T (&amp;)[N]) {\r\n    return N;\r\n}\r\n\r\nvoid check(int const (&amp;param)[3]) {\r\n    constexpr auto s2 = array_size(param); \/\/ Previously ill-formed, now accepted as a constant expression after P2280R4.\r\n}\r\n<\/code><\/pre>\n<h2>Smaller Conformance Updates<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2635\">CWG2635<\/a> &#8211; Constrained structured bindings.<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2465\">CWG2465<\/a> (Coroutine parameters passed to a promise constructor)<\/li>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2021\/p2360r0.html\">P2360R0<\/a> which extends the definition of an init-statement to allow an alias-declaration<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2496\">CWG2496<\/a> &#8211; ref-qualifiers and virtual overriding.<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2506\">CWG2506<\/a>: Structured bindings and array cv-qualifiers.<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2507\">CWG2507<\/a> (default arguments for operator[]).<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2585\">CWG2585<\/a>: No change required to behavior.<\/li>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2022\/p2290r3.pdf\">P2290R3<\/a> C++23 Hex\/oct delimited escape sequence support in string literals.<\/li>\n<li><a href=\"https:\/\/cplusplus.github.io\/CWG\/issues\/2521\">CWG2521<\/a> which deprecates &#8216;operator string-literal identifier&#8217;.<\/li>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/cwg_defects.html#2528\">CWG2528<\/a> which relaxes conversion rules for the spaceship operator.<\/li>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2023\/p2797r0.html\">P2797R0<\/a>: Proposed resolution for CWG2692 Static and explicit object member functions with the same parameter-type-lists.<\/li>\n<li><a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2022\/p2266r3.html\">P2266R3<\/a> Simpler implicit move.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Implement a warning to notify of the enum type change caused by \/Zc:enumTypes.<\/li>\n<\/ul>\n<h2>Compiler Improvements in v14.50<\/h2>\n<h3>C++\/CLI<\/h3>\n<ul>\n<li>Fix ICE on use of &#8216;auto&#8217; in member declarations in C++\/CLI managed types\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/static-constexpr-causes-CCLI-compiler\/1536217\">static constexpr causes C++\/CLI compiler crash<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Compiler-crash-A-managed-type-cannot-ha\/1536159\">Compiler crashes: A managed type cannot have any friend functions\/classes\/interfaces<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix crash in compiler in C++\/CLI code using ref-types on stack\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/clexe-terminates-with-error-code--52970\/10777778\">cl.exe terminates with error code -529706956<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Visual-Studio-1712-introduced-multiple-\/10792822\">Visual Studio 17.12 introduced multiple errors while building managed C++ code in an MFC application<\/a><\/li>\n<\/ul>\n<h3>Diagnostics<\/h3>\n<ul>\n<li>Fix an incorrect diagnostic about implicit enum type conversions in C even when the code explicitly converts the expression\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/warning-C5287:-operands-are-different-e\/10877942\">&#8220;warning C5287: operands are different enum types&#8221; even with an explicit cast<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><code>constexpr<\/code><\/h3>\n<ul>\n<li>Fixes several errors involving virtual function calls at compile-time.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-erroneously-claims-the-return-value\/10184063\">MSVC erroneously claims the return value of a virtual constexpr function-call operator is not a constant expression<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C20-constexpr-virtual-polymorphism-is-\/10348572\">C++20 constexpr virtual polymorphism is broken in MSVC but works in ClangCL and intellisense<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Virtual-constexpr-function-did-not-evalu\/10360010\">Virtual constexpr function did not evaluate to a constant<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Unable-to-use-virtual-function-in-conste\/10820093\">Unable to use virtual function in constexpr expression<\/a><\/li>\n<\/ul>\n<\/li>\n<li>constexpr should reject overflow from addition and left shifting of constants\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/1202945\/signed-overflow-in-constant-core-expression-should.html\">Signed overflow in core constant expression should not be allowed in all cases<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix scenarios where constructors should be made implicitly constexpr\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Multiple-constexpr-bugs-including-regre\/10855054\">Multiple constexpr bugs (including regresions)<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixes scenario when initializing a constexpr variable with a consteval call\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Multiple-constexpr-bugs-including-regre\/10855054\">Multiple constexpr bugs (including regresions)<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with constexpr static data members and the CRTP.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/1110270\/crtp-in-msvc-1924-not-seeing-variable.html\">CRTP in MSVC 19.24 not seeing variable<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Static-constexpr-member-of-CRTP-base-cla\/10503957\">Static constexpr member of CRTP base class not seen<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixes a bug related to evaluating destructors of constant objects too early; objects appeared at runtime to be in their destroyed state.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-1437-40-forces-my-global-std::stri\/10794576\">MSVC 14.37-40 forces my global std::string to be constinit; constinit strings don&#8217;t survive intact<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with constexpr lambda captures and guaranteed copy elision with a compiler generated call to memset.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Lambda-in-a-function-template-requests-c\/10922885\">Lambda in a function template requests capturing a constexpr variable which is not odr-used<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Allow consteval constructor calls as argument of direct-initialization.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-Fails-to-compile-list-and-direct-in\/10915063\">MSVC Fails to compile list and direct initialization in C++20 when member constructor is consteval<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed an issue where calling certain <code>consteval<\/code> functions in an <code>if consteval<\/code> would sometimes produce a compiler error.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/The-consteval-function-is-not-an-immedia\/10900618\">The consteval function is not an immediate function under if consteval<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Allow constexpr references to be initialized with derived class rvalue.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Downcasting-constexpr-instance-with-stat\/740496\">Downcasting constexpr instance with static_cast not valid in constant expression<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/wrong-code-bug-in-constexpr-evaluation\/10673004\">wrong code bug in constexpr evaluation<\/a><\/li>\n<\/ul>\n<h3>C++ Modules<\/h3>\n<ul>\n<li>Fix bug with importing friend declaration where the class-head-name was in a particular qualified-id form, encountered in nlohmann\/json library.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/nlohmannjson-does-not-compile-as-C20-\/10908164\">nlohmann\/json does not compile as C++20 module<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix compiler crash when using-declarations are used from a specialization inside a module.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-compiler-error-when-using-usin\/10934729\">Internal compiler error when using &#8220;using&#8221; declaration with template base class in module fragments<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue that std::expected can&#8217;t be specialized in some cases when imported from a module.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C1907-modules-constexpr-and-std::expect\/10501314\">C1907 modules, constexpr and std::expected<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed an issue where functions using types from a named module would sometimes not execute properly or cause linker failures.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Compiler-uses-non-exported-class-definit\/10863347\">Compiler uses non-exported class definition from wrong module (C++20)<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix issue when importing a constexpr function with static local variables\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/ICE-when-calling-imported-function-that-\/10913469\">ICE when calling imported function that returns local static container data<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed an issue where the compiler would sometimes not respect a <code>#pragma warning(disable:...)<\/code> when the pragma appeared in a module or header unit.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/pragma-warningdisable-not-working-in-\/10937100\">#pragma warning(disable) not working in nested headers used with header units<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed various issues preventing Unreal Engine 5 from building with header units.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Unreal-does-not-build-with-header-units-\/10800119\">Unreal does not build with header units enabled<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C-modules-compiler-error:-Base-class-u\/10827852\">C++ modules compiler error: Base class undefined<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C20-modules--boost::asio-still-being-\/10038468\">C++20 modules + boost::asio still being weird<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C20-modules:-specialzations-in-the-glo\/10826499\">C++20 modules: specialzations in the global module fragment are discarded even if they are decl-rechable<\/a><\/li>\n<\/ul>\n<h3>Conformance<\/h3>\n<ul>\n<li>Add support for &#8216;[[maybe_unused]]&#8217; 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.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/unreferenced-label-when-ref-hidden-by-if\/102076\">&#8220;unreferenced label&#8221; when ref hidden by &#8220;if constexpr&#8221;<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Diagnose ill-formed friend explicit specializations that were incorrectly accepted in C++20 or later.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Defining-explicit-function-template-spec\/10933841\">Defining explicit function template specialization in friend declaration is wrongly permitted<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with the compiler allowing specifiers (other than type-specifiers) as part of a type-id\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/accepts-invalid-cl-will-accept-constex\/535959\">[accepts invalid] cl will accept constexpr template arguments<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Add a switch, &#8216;\/Zc:enumEncoding&#8217;, to correctly encode the use of an enumeration as a non-type template parameter.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Overload-resolution-fails-for-enum-non-t\/10398088\">Overload resolution fails for enum non-type template parameters<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue in which the compiler did not issue a diagnostic if a user did not prepend a dependent template-id with the &#8216;template&#8217; keyword.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/No-diagnostic-for-missing-template-in-d\/10501221\">No diagnostic for missing .template in dependent names<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with the compiler allowing specifiers (other than type-specifiers) as part of a type-id\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/accepts-invalid-cl-will-accept-constex\/535959\">[accepts invalid] cl will accept constexpr template arguments<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Reliability<\/h3>\n<ul>\n<li>Fix an ICE when explicitly instantiating a class template which has friend functions.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-compiler-error-ICE-on-explici\/10903887\">Internal compiler error (ICE) on explicit class instantiation new to VS 2022 17.14<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an ICE involving explicit variable template instantiations when PCH files are used.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C-explicit-variable-template-instantia\/10933044\">C++ explicit variable template instantiation causes internal compiler error when using precompiled header<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a compiler crash involving deep nesting of aggregates, non-aggregates, and initializer lists\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-Compiler-Error-Found-in-MSVC-14\/10914206\">Internal Compiler Error Found in MSVC 14.44.35207<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with nested generic lambdas and an issue with using &#8216;template&#8217; in a qualified-id\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/VS-1714-Preview-30:-ICE:-error-C1001:-\/10891418\">VS 17.14 Preview 3.0: ICE: error C1001: Internal compiler error.<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/1714-Preview-3-Internal-compiler-error\/10892047\">17.14 Preview 3 Internal compiler error<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixes internal compiler error when elaborating a struct with the same name as overloaded member functions\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Template-Internal-Compiler-Error\/10867020\">Template Internal Compiler Error<\/a><\/li>\n<\/ul>\n<\/li>\n<li>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\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/VS-2022-C-compiler-uses-nearly-200x-as\/10900008\">VS 2022 C++ compiler uses nearly 200x as much memory as VS 2019 compiler<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with the IL we generate for a temporary that it bound to a non-static data member of reference type.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/CLexe-crashes-with-Access-Violation-on-\/10878252\">CL.exe crashes with Access Violation on specific code involving references<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a compiler ICE when the nested lambda inside a generic lambda references a qualified name.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/VS-1714-ICE-with-a-very-particular-func\/10905218\">VS 17.14 ICE with a very particular function template<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed an ICE after error when the compiler saw an <code>if constexpr<\/code> with empty condition.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-compiler-error-parsing-invalid-\/10908856\">Internal compiler error parsing invalid <code>if constexpr<\/code><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a compiler crash associated with initializing a bit field.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-compiler-error-in-VS2022-1710\/10932332\">Internal compiler error in VS2022 17.10+<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with the compiler complaining about an ill-formed pure-specifier within a function template\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Erroneous-reporting-of-C5288-with-class-\/10914211\">Erroneous reporting of C5288 with class defined in function template in MSVC 14.44.35207<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a compiler ICE when the nested lambda inside a generic lambda references a captured variable.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/ICE-with-nested-std::visit--lambda-capt\/10910959\">ICE with nested std::visit + lambda captures<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix crash when comma missing between designated initializers\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-compiler-error-with-designated-\/10618932\">Internal compiler error with designated initializer in lambda<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixes a compiler crash with initialization of aggregates involving commas and initializer lists.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-Compiler-Error-Found-in-MSVC-14\/10914206\">Internal Compiler Error Found in MSVC 14.44.35207<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with lambdas and non-type template parameters whose type is a pointer-to-member.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-Compiler-Error-ICE-on-functio\/10901616\">Internal Compiler Error (ICE) on function returning closure object<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Correct bad code generation for certain templated conversion operators\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Wrong-code-generation-in-use-of-template\/10874101\">Wrong code generation in use of templated conversion operator with explicit object parameter<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an internal compiler error during initialization of nested aggregates with initializer lists\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Internal-Compiler-Error-Found-in-MSVC-14\/10914206\">Internal Compiler Error Found in MSVC 14.44.35207<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/ICE-when-trying-to-access-not-captured-p\/10931548\">ICE when trying to access not captured pointer in lambda<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/fatal--error-C1001:-Internal-compiler-er\/10906076\">fatal error C1001: Internal compiler error.<\/a><\/li>\n<\/ul>\n<h3>Correctness<\/h3>\n<ul>\n<li>Fix an issue with exception handling and unions; and an issue with the handling of an rvalue reference in the context of a lambda.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/CLexe-exited-with-code--529706956-whe\/10915135\">Internal compiler error when compiling C++17 code using union and std::array<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/When-using-a-lambda-as-a-template-argume\/10916555\">When using a lambda as a template argument for a callback, the reference is not correctly bound.<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue when explicit instantiation sometimes picks the wrong overload which has a requires clause.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Overload-resolution-for-constrained-func\/10107770\">Overload resolution for constrained function templates confused by explicit instantiation<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Correct some semantic issues with noexcept specifiers and compile errors for some noexcept specifiers on member functions.\n<ul>\n<li><a href=\"https:\/\/developercommunity2.visualstudio.com\/t\/noexcept-for-some-reason-work-with-type\/1321108\">noexcept for some reason work with type<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity2.visualstudio.com\/t\/noexcept-doesnt-wants-to-work-with-oper\/1321173\">noexcept doesn&#8217;t wants to work with operator type cast<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C-Post-increment-operator-cannot-ref\/10269323\">[C++] Post-increment operator cannot refer to <code>this<\/code> pointer in <code>noexcept<\/code> specifier<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with phase-1 name binding in a non-static data member initializer\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Wrong-context-for-class-field-initialize\/10896684\">Wrong context for class field initializer<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an incorrect value category for expressions involving indirections and arrays.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/cl-Preview-fails-to-properly-determine-a\/10907452\">cl Preview fails to properly determine assignment of a prvalue<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a syntax error when parsing certain template-ids in alias declarations inside some templates.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Source-code-parsing-error-in-boostparse\/10869546\">Source code parsing error in boost.parser in 17.14 Preview<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with partial ordering and template parameter objects\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Template-Specialization-is-not-selected-\/10902294\">Template Specialization is not selected when passing out-of-line Lambda NTTP<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a bad error C2355 on &#8216;this&#8217; in a local class declaration.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/C2355-is-wrongly-triggered-when-local-cl\/10936151\">C2355 is wrongly triggered when local class is defined in a static member function<\/a><\/li>\n<\/ul>\n<\/li>\n<li>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.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/A-C1001-error-occurs-in-VS1714\/10909397\">A C1001 error occurs in VS17.14<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Code-does-not-compile-with-MSVC\/10911788\">Code does not compile with MSVC<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue causing __declspec(no_sanitize_address) to be ignored on lambdas and forward-declared functions.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Address-Sanitizer-declspecsattributes-d\/10850249\">Address Sanitizer declspecs\/attributes do not behave consistently across compilers<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix incorrect point of instantiation when an inline static data member has a class template specialization type.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/static-inline-atomic-and-another-atomic-\/10203656\">static inline atomic and another atomic generate warning C4744 in Release configuration<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue when a static operator() was also an abbreviated function template.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Call-to-static-operator-is-elided\/10908158\">Call to static operator() is elided<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with no_unique_address and class types with common subobjects.\n<ul>\n<li>[[[msvc::no_unique_address]] incorrectly optimizes mixed structs with leading nested empty struct](<a href=\"https:\/\/developercommunity.visualstudio.com\/t\/msvc::no_unique_address-fails-to-opt\/10892814\">https:\/\/developercommunity.visualstudio.com\/t\/msvc::no_unique_address-fails-to-opt\/10892814<\/a>)<\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with template template parameters and default template arguments\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/VS2022-VC-default-template-parameter-d\/10929350\">VS2022 VC++ default template parameter derivation error causes the result to be inconsistent with expectations<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix incorrect resolution of a name referring to the enclosing class template.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-Fails-to-compile-friend-function-te\/10917948\">MSVC Fails to compile friend function template whose template constraint (C++20) contains the enclosing class template<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue causing error C2106 on certain member-access expressions that should be lvalues.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/After-updating-VS2022-to-1714-C-compi\/10905664\">After updating VS2022 to 17.14 C++ compiler is giving me an error about lvalue and ending up with ICE (open source code)<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fixed an issue where <code>decltype<\/code> would sometimes return the wrong type when used with ternary expressions.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/conditional-operator-gives-wrong-result-\/10665330\">conditional operator gives wrong result type if both operands are static_cast to prvalue pointer type<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix 1) an issue with C++23 multi-dimensional array indexing; 2) an issue with allowing &#8216;[[maybe_unused]]&#8217; on a label; and 3) an issue with the compiler being too eager to instantiate a specialization of a function template.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Multidimensional-operator-with-Wall-r\/10876026\">Multidimensional operator[] with \/Wall reports bogus warning C4548<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Discarded-statement-instantiated-in-a-ge\/10877428\">Discarded statement instantiated in a generic lambda<\/a><\/li>\n<\/ul>\n<\/li>\n<li>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\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Bogus-C4100-unreferenced-formal-paramet\/10720820\">Bogus C4100 &#8220;unreferenced formal parameter&#8221; warning with <code>if constexpr<\/code> in static member function template of a class template<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix spurious unreferenced variable warning for OpenMP private loop variable.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Incorrect-C4101-OpenMP-compiler-warning-\/10517287\">Incorrect C4101 OpenMP compiler warning in 17.8.0<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix issues with &#8216;std::bit_cast&#8217;, integral non-type template parameters and instantiation of variable templates.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/__builtin_bit_cast-Internal-compiler-err\/10939926\">__builtin_bit_cast Internal compiler error<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Issue-in-specific-conditions-with-modulo\/10940009\">Issue in specific conditions with modulo operator in variadic template with &#8220;\/permissive-&#8221; after version 19.32.<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix spurious warning C4193 when compiling some preprocessed files\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Incorrect-C4193-with-std:c20\/10875326\">Incorrect C4193 with \/std:c++20<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a missing error when aggregate initialization is incorrectly used during class template argument deduction.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Deduction-of-class-template-arguments-pi\/10939918\">Deduction of class template arguments picks up wrong constructor<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix determination of value category for certain kinds of expressions involving a sub-expression that is a conditional expression.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Class-members-arrays-element-is-not-an\/10908213\">Class member&#8217;s array&#8217;s element is not an l-value in a ternary expression<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with an elaborated class-specifier in a template argument list\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Unreal-Engine-Template-compile-error-r\/10885481\">[Unreal Engine] Template compile error regression with msvc 14.42<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix an issue with operator binding and an issue with binding local class types.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Unreal-Engine-Template-compile-error-w\/10902983\">[Unreal Engine] Template compile error with msvc 14.44<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Fix a couple of issue related to using enum declarations.\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/using-enum-c-20-doesnt-supported-as-we\/10926317\">using enum c++ 20 doesnt supported as well<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-does-not-compile-a-function-type-wi\/234776\">MSVC does not compile a function type with multiple parentheses<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Defining-class-method-outside-the-class\/10929631\">Defining class method outside the class, with concept<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Variable-Declaration-Allowed-Inside-Swit\/10281175\">Variable Declaration Allowed Inside Switch Case Without Scoping Operator<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/No-warning-C4706-for-assignment-to-std::\/10937044\">No warning C4706 for assignment to std::unqiue_ptr used as a condition<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/VS-1714-if-constexpr-requires--does\/10905731\">VS 17.14. &#8220;if constexpr (requires &#8221; doesn&#8217;t work correctly<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Incorrect-overload-resolution-for-static\/10928328\">Incorrect overload resolution for static operator()<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Lvalue-to-rvalue-conversion-rules-for-st\/10881695\">Lvalue-to-rvalue conversion rules for std::nullptr_t are violated<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Error-message-depends-on-unused-paramete\/10889027\">Error message depends on unused parameter pack<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/In-class-initialization-of-pointer-to-me\/657401\">In-class initialization of pointer-to-member + virtual function make MSVC to compile incorrectly<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/MSVC-Compiler-Bug:-requires-Constraint-F\/10897277\">MSVC Compiler Bug: requires Constraint Fails to Remove Non-Matching Template Candidates, Leading to Compilation Error<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Regression:-c-compilation-failure-in-c\/10926790\">Regression: c++ compilation failure in code generated by Qt&#8217;s meta object compiler<\/a><\/li>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Rejects-valid-pack-expansion-in-base-spe\/10929841\">Rejects valid pack expansion in base specifier in lambda body<\/a><\/li>\n<\/ul>\n<h3>Correctness (C compiler)<\/h3>\n<ul>\n<li>In C23, don&#8217;t decay functions to function pointers when used as an argument to <code>typeof<\/code>\n<ul>\n<li><a href=\"https:\/\/developercommunity.visualstudio.com\/t\/__typeof__-not-working-with-function-typ\/10891974\"><strong>typeof<\/strong> not working with function types<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Closing<\/h4>\n<p>As always, we welcome your feedback. Feel free to send any comments through e-mail at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>, through <a href=\"https:\/\/twitter.com\/visualc\">Twitter @visualc<\/a>, or through BlueSky <a href=\"https:\/\/bsky.app\/profile\/msftcpp.bsky.social\">@msftcpp.bsky.social<\/a>. Also, feel free to follow Cameron DaCamara on Twitter <a href=\"https:\/\/twitter.com\/starfreakclone\">@starfreakclone<\/a>.<\/p>\n<p>If you encounter other problems with MSVC in Visual Studio 2026 please let us know via the <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2026\">Report a Problem<\/a> option, either from the installer or the Visual Studio IDE itself. For suggestions or bug reports, let us know through <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Developer Community<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ Language Updates in MSVC Build Tools v14.50 It 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 [&hellip;]<\/p>\n","protected":false},"author":39620,"featured_media":35800,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,1,264],"tags":[8,140,100,65,282,36],"class_list":["post-35720","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-cplusplus","category-featured","tag-announcement","tag-c","tag-c-language","tag-compiler","tag-msvc","tag-vc"],"acf":[],"blog_post_summary":"<p>C++ Language Updates in MSVC Build Tools v14.50 It 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/39620"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=35720"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35720\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35800"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=35720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=35720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=35720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}