r/cpp • u/STL MSVC STL Dev • Apr 09 '26
C++23 Support in MSVC Build Tools 14.51
https://devblogs.microsoft.com/cppblog/c23-support-in-msvc-build-tools-14-51/
180
Upvotes
r/cpp • u/STL MSVC STL Dev • Apr 09 '26
55
u/STL MSVC STL Dev Apr 09 '26
This is the blog post about C++23 front-end features that I previously promised was coming, written by our compiler front-end dev lead Daniel Griffing with assistance from one of our FE devs RanDair Porter. The library section was written by some guy who usually makes cat noises. A few additional notes:
mainbranch as of 2026-03-23 are available. This latency (of 17 days) is more than our 1-week goal, but the engineering systems team is turning the crank faster and we should be shipping new builds more regularly very soon.Launch-VsDevShell.ps1script to add-Previewand-NoLogooptions, so if you're setting up PowerShell environments, you'll be able to select Preview build tools (and silence annoying mortals) just like the batch files have always been capable of. This change is not yet available but should be in the Insiders IDE very soon (the PowerShell script belongs to the IDE, not the build tools).-vcvars_ver=previewtovcvarsall.bat, or equivalently configure the VS IDE.)This is what you should observe when using the build from 2026-03-23 that contains
<flat_meow>and the other goodies mentioned in this blog post (note: if you're reading this in the future, your version numbers may be higher, that's fine):15
u/slithering3897 Apr 09 '26 edited Apr 09 '26
Oh good, I was waiting for
<flat_map>and<flat_set>to show up.And glad to see that Intellisense is even mentioned. I do hope it gets fixed for modules at some point.
6
u/MarekKnapek Apr 10 '26
ABI break when?
Some people are able to compile their entire code base from scratch every time. For those people, ABI compatibility (with Visual Studio 2015 I believe) is holding them back on correctness and performance improvements.
Of course, there are some big customers for which ABI stability is important and this takes precedence.
89
u/__Punk-Floyd__ Apr 09 '26
So happy to read an update that doesn't contain the word 'agent' or 'model'.
6
u/Internal-Sun-6476 Apr 09 '26
I get it. Reflection has given us god-like powers, and mp-units is divine.
But now we get: "silence annoying mortals". C++ just keeps giving. 😉
6
u/Ambitious-Method-961 Apr 09 '26
Even though my needed (well... wanted) C++23 features have already landed, it's great to see the rest of them coming through. Great work by the team!
2
u/pjmlp Apr 10 '26
With or without finally working modules support, given that
import stdis a C++23 feature?As for the rest, thanks to finally give some information on this.
4
u/Negitivefrags Apr 11 '26
Regarding P2448R2 Relaxing some constexpr restrictions
Given the example, what is the purpose of a constexpr function at this point?
Couldn't we just say that any function you can see the definition of is constexpr now?
Then if you decide to assign it's result to consteval you get an error, otherwise the compiler attempts to evaluate it at compile time. But hang on, doesn't the compiler attempt to do that anyway?
I've actually lost track of what constexpr even means at this point.
1
u/greencursordev Apr 10 '26
Can someone parse that and give an actual calender date?
1
u/Baardi May 21 '26
Considering 14.50 is the LTSC version. What is the correct approach for getting security updates on 14.50?
Stay on VS2026 18.5, updating patch versions, using the latest toolset? Or are Visual Studio minor versions not maintaned like they used to, and we should upgrade to use 18.6 with the 14.50 toolset?
3
u/gracicot Apr 10 '26
I know these posts are generally not made to ask for this but, is there any chance the next version of MSVC build tool will fix user defined conversions with parenthesized initialization? I have to use kind of nasty hacks in generic code since it changes the output of std::constructible_from.
As a secondary question, are the paragraphs from the standard I found the right one to describe the issue? I tried to be helpful by finding where exactly in the standard it shows where msvc is not compliant, but initialization rules are pretty difficult to parse.
2
u/tartaruga232 MSVC user, r/cpp_modules Apr 10 '26
I recently got confused because seemingly out of the blue an old hacky macro we defined for using string resources in C++ code used inside a C++ module suddenly stopped working.
I had to fix it with
I thought, what the heck changed?
Now I understand I got a brand new compiler version when I last updated my visual studio (insiders)! Really cool! Thanks a lot to everyone who worked on this stuff.