Skip to main content
bebuch u/bebuch avatar

bebuch

u/bebuch

Feed options
Hot
New
Top
View
Card
Compact

Does using fmt::format_string solve your problem?

https://www.godbolt.org/z/qzYhT316T


Can you provide a minimal reproducable example for the second point? Please include your exact MSVC version.


Looks like there is some progress now, at least some message from the feedback but.

Thanks for sharing your view and insights Stephan! 🤗


Nop, STL shared in the preview post a view weeks ago that this was one of the things from his wish list that he didn't get. ;-)

Nevertheless the compiler made good progress. The MS STL library was already top before.


How is the else notation different? If you argue that the code is unreachable in that particular instantiation, you can say the same about any code in the else branch.

Of course no one would say that, because it's the point of an if-else that only one branch is evaluated, even on a template dependent constexpr compile time evaluation. 

And its the exact same thing with an early return in a constexpr if. For the same reason you won't warn that the else branch is not evaluated for that instantiation, you must not warn about code after an early return.

That you can workaround that with the else notation doesn't make this a valid warning.

However, would you be so kind to forward this to the compiler team? I'm waiting on feedback for over a month now and in my experience that means that it got stuck in some pre-review and was forgotten there. 😅


Could you please have a look at my MSVC bug report:

https://developercommunity.visualstudio.com/t/Wrong-C4702-unreachable-code-in-template/10978308

I didn't test yet if it can be reproduced with VS 2026. But it would be helpful to get some feedback.


Btw: Is there already any discussion in the Visual Studio team about the EDG "winding down"?


Welcome to the strange world of old commercial Microsoft products. ;-)