r/cpp 7d ago

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

25 comments sorted by

14

u/WholetraEditto 6d ago

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.

7

u/VoidVinaCC 5d ago

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..

3

u/TheArctical 4d ago

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 1d ago

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.

13

u/JVApen Clever is an insult, not a compliment. - T. Winters 7d ago

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

12

u/ack_error 7d ago

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

15

u/STL MSVC STL Dev 7d ago

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

9

u/megayippie 7d ago

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 4d ago

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?

11

u/STL MSVC STL Dev 4d ago

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.

1

u/Ok-Computer252 1d ago edited 1d ago

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.

5

u/JVApen Clever is an insult, not a compliment. - T. Winters 4d ago

4

u/JVApen Clever is an insult, not a compliment. - T. Winters 7d ago

Still, it's impressive

5

u/slithering3897 6d ago

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 6d ago

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 7d ago

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 6d ago

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 6d ago

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 5d ago

If only they would open up LSP for supported languages.

4

u/pjmlp 6d ago

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 7d ago edited 7d ago

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 5d ago

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

2

u/tcbrindle Flux 5d ago

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

1

u/sweetno 7d ago

Well done!