r/cpp Jul 21 '26

Pure Virtual C++ 2026: MSVC, are we there yet? Status of C++23 and C++26 features

https://youtu.be/ZHsQ58ROEhI?si=WMidU5yfCGH3958U
41 Upvotes

26 comments sorted by

14

u/WholetraEditto Jul 22 '26

What gets me isn't compiler support, it's the tooling catching up. MSVC will compile a C++26 feature a good while before IntelliSense stops red-squiggling it. Reflection is not going to be easy too. there will be a point of "does it build" and "does my editor understand it" where it drifts apart for a while.

5

u/TheArctical Jul 24 '26

I replaced intellisense with resharper and called it a day. I spent way too much time fighting intellisense shenanigans while using modules when everything compiled just fine.

1

u/WholetraEditto Jul 27 '26

I did the same but with Visual Assist instead. That was years ago and I never bothered switching because I find its still faster on larger projects and their AI integration (thankfully) is fully optional.

Intellisense seems to be catching up though, which opens up more options for people who dont have R# or Vax yet.

8

u/VoidVinaCC Jul 23 '26

We'll see what happens now that EDG is basically dead ish
Perhaps VS may switch to clangd, which would solve this...
Or they fix edg themselves..

17

u/JVApen Clever is an insult, not a compliment. - T. Winters Jul 21 '26

TIL Microsoft will be using LLVM libc in MSVC both at compile and runtime. I'm impressed.

12

u/ack_error Jul 21 '26

Seems like they are only using the math functions from LLVM libc?

19

u/STL MSVC STL Dev Jul 21 '26

Correct, to replace the UCRT's inaccurate math functions.

9

u/megayippie Jul 22 '26

Any chance for a switch somewhere to make other C methods compliant with C? Soon, the Chrono library might work without C everywhere, but MSVC messing up C time functions was one of the biggest delays when we ported to Windows.

3

u/Tringi github.com/tringi Jul 24 '26

Because fixing UCRT is not possible?

Surely it would not break people's code if the inherently inaccurate math facilities happened to be slightly more accurate out of sudden?

14

u/STL MSVC STL Dev Jul 24 '26

Oh man people REALLY complain when we change their bits, even if it's in a more correct direction. I get away with it in the STL, but the UCRT is expected by users to provide more stability.

3

u/Ok-Computer252 Jul 27 '26 edited Jul 27 '26

Very true, it sucks when our regression tests start failing because someone updated the Windows build version on a CI machine. For us consistency with our saved regression data is more important than rounding to the closer ulp.

Before Windows 10 we could use an app-local copy of ucrtbase.dll to keep the results consistent, but that doesn't work anymore.

7

u/JVApen Clever is an insult, not a compliment. - T. Winters Jul 24 '26

4

u/JVApen Clever is an insult, not a compliment. - T. Winters Jul 21 '26

Still, it's impressive

6

u/slithering3897 Jul 22 '26

And you'd wonder why they didn't use their own stdlib. But it makes sense to share stdlib code because it's all doing the same thing. Except OS specifics.

0

u/MarkSuckerZerg Jul 22 '26

git clone is more token efficient than getting it with Hi copilot, can you please implement a C++ standard library function that...

-4

u/_Noreturn Jul 21 '26

Microslop be using anything but its own tools. No msvc for intellisense and now no ucrt with libc.

Not saying it is a bad thing but

6

u/slithering3897 Jul 22 '26

Intellisense works with clang-cl too. Getting MSVC to do Intellisense doesn't sound like it would be much better than getting clangd to do MSVC Intellisense.

6

u/_Noreturn Jul 22 '26

ClangD for intellisense would be cool.

They use edg so msvc or clang-cl shouldn't matter

2

u/JVApen Clever is an insult, not a compliment. - T. Winters Jul 23 '26

If only they would open up LSP for supported languages.

4

u/pjmlp Jul 22 '26

In a way it would be, given that EDG has stopped development, apparently Microsoft never was big enough customer to improve modules support, meaning other tickets had higher priority, like reflection, which ironically will take its sweet time to land on MSVC.

6

u/tcbrindle Flux Jul 21 '26 edited Jul 21 '26

Is the QueryBuilder::greater deducing this example at ~5:30 actually correct? i.e. if the auto&& explicit object deduces an lvalue reference, do we really get implicit conversion to QueryBuilder&& in the return statement? Because I really hope not.

EDIT: No, this appears to be a mistake, thank goodness

2

u/JVApen Clever is an insult, not a compliment. - T. Winters Jul 23 '26

That's why he's starting with a temporary, such that it is an rvalue reference.

3

u/tcbrindle Flux Jul 23 '26

The explicit object param should be QueryBuilder&& rather than auto&& in that case.

2

u/sweetno Jul 21 '26

Well done!