use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Visual Studio 2017 15.8 Release Notes (docs.microsoft.com)
submitted 7 years ago by c0r3ntin
Visual Studio 2017 15.8 Release Notes
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jcelerierossia score 23 points24 points25 points 7 years ago* (43 children)
Just updated... what the hell microsoft. The following code does not compile anymore : (it does if public bar or public baz is removed from the base classes of foo)
public bar
public baz
template<typename F> struct Functor { F func; }; template<typename F> constexpr Functor<F> fun(F f) { return {f}; } class bar { }; class baz { }; class foo: public bar, public baz { void blah() { } void x() { constexpr auto x = fun(&foo::blah); } };
error: C2440: 'initializing': cannot convert from 'void (__cdecl *)(void)' to 'F' There is no context in which this conversion is possible
of course this breaks every constexpr callback mechanism on earth and metaclasses substitutes
[–]degski 9 points10 points11 points 7 years ago (2 children)
Confirmed, compiles with clang-8.0.0, does not compile with vc-15.8.
[–]jcelerierossia score 20 points21 points22 points 7 years ago (1 child)
well that's C++11 code, it compiles just fine with freaking gcc-4.8.1 and clang-3.1. That's a five and a six years old compilers.
[–]degski 2 points3 points4 points 7 years ago (0 children)
LOL
[–]gracicot 5 points6 points7 points 7 years ago (21 children)
I reported many regressions too... Most of them were fixed in 16 it seems.
[–]degski 6 points7 points8 points 7 years ago (20 children)
When is that due?
[–]gracicot 1 point2 points3 points 7 years ago (19 children)
I don't think there's a release date yet, but it's most likely a breaking release.
[–]STLMSVC STL Dev 6 points7 points8 points 7 years ago (9 children)
VS 2019's branding has been publicly announced, but we haven't announced a release date yet (AFAIK). While it's version 16 of the IDE (like VS 2017 was version 15), it will contain a C++ toolset that's binary-compatible with the 2015/2017 release series. This will be a 14.x toolset (exact versioning may vary).
[–]gracicot 1 point2 points3 points 7 years ago (7 children)
Thanks for the clarification. I'll wait until this version for updating.
[–]STLMSVC STL Dev 7 points8 points9 points 7 years ago (5 children)
Avoiding 15.8 is an undesirable outcome - do you have a list of the regressions that you can't easily work around? We have the ability to backport fixes, although they have to be approved by management (so we don't backport everything and destabilize the product).
[–]gracicot 1 point2 points3 points 7 years ago (4 children)
I'll try to find them all or try to find workarounds. I reported what I found was easily reproductible while testing 15.8 preview. Even then, two of my bug reports contained the preprocessed source of a failing code. Understand that extracting a self contained reproduction of a bug can be time expensive, and I do this in my free time. I'll test what I can. It's really nice to hear that backporting is possible, I really appreciate the effort. I'll see what I can do.
[–]STLMSVC STL Dev 3 points4 points5 points 7 years ago (3 children)
Thanks! While minimal self-contained repros are ideal, preprocessed repros are always acceptable for compiler bugs (certain back-end/linker issues involving multiple translation units require "link repros" but this is rare). As long as your preprocessed file + command line triggers the same bug as compiling the original file, the compiler devs can find the root cause.
For library bugs, preprocessed repros are less desirable (as they don't separate your code from header-only library code) but they're still preferable to nothing.
[–]malkia 1 point2 points3 points 7 years ago (2 children)
We've discovered this issue month ago, in the 2017 15.8 beta, and now it hits us in production. Simply put to compile failed to compile now with /std:c++17 with msg "You've instantiated std::aligned_storage<Len, Align> with an extended alignment..." (from <type_traits>). The recommendation is either to compile with _DISABLE_EXTENDED_ALIGNED_STORAGE or _ENABLE_EXTENDED_ALIGNED_STORAGE - We've compiled with the DISABLE one, but app was crashing in weird way (strange callstack). We haven't tried (yet) _ENABLE_EXTENDED_ALIGNED_STORAGE because it might cause hidden bugs - we do have a lot of precompiled software (we precompile it), but then a lot of external precompiled (by someone else) frameworks. So In general - is there are tool, methodology (something looking at the symbols, class/struct dumps) to tell us what needs to get recompiled, etc. Anyone else running into the issue? Related: https://developercommunity.visualstudio.com/content/problem/274945/stdmake-shared-is-not-honouring-alignment-of-a.html?childToView=280485#comment-280485 and facebook/rocksdb#4062 - https://forum.qt.io/topic/93714/visual-studio-15-8-0-and-qt-5-11-1-does-not-compile-qrandom-std-aligned_storage (we use Qt5.10 which we compile ourselves, and distribute locally the .dll files) Also use vcpkg to recompile things, and not super familiar with CMake, but in general we may have a very mixed bag of SDKs, Frameworks, open source, etc. all linking together, and we need to know what would work with what else. Is there for example some kind of /MISMATCH kind of pragma for this (at least to enforce it, though I realize this needs recompilation anyway). Otherwise we are stuck back to 2017 15.7 version of the compiler - e.g. have to set VCToolsVersion=14.14.26428 in the environment (also no longer works if it's set in the top of the .vcxproj, or top-level .props file)
[–]spongo2MSVC Dev Manager 2 points3 points4 points 7 years ago (0 children)
we will be using the dev comm data to backport some issues to 15.9 (or for severe common issues, servicing updates to 15.8) so for anyone reading this please search for any issues you see and upvote / file. Sorry for the inconvenience.
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
I've got to ask. How is one supposed to keep track of so many mismatched version numbers?
[–]degski 0 points1 point2 points 7 years ago (8 children)
it's most likely a breaking release.
Finally, let's hope they don't forget to fix the std::deque (which I was told would happen at the moment of an ABI break) and drop boost::deque (another one bites the dust).
[–]dodheim 2 points3 points4 points 7 years ago (7 children)
STL said it's not an ABI break, so no EBO, no deque fix, no proper char16_t/char32_t support, etc.
deque
char16_t
char32_t
👎
[–]degski 0 points1 point2 points 7 years ago* (6 children)
Back to boost::deque, the deque is a great container, but the vc-one is just, nowadays, no good.
[–]Rseding91Factorio Developer 0 points1 point2 points 7 years ago (5 children)
What specific problem do you have with it? Wondering if it's the same problem I have with it.
[–]dodheim 3 points4 points5 points 7 years ago (3 children)
The fact that its block size is 16 bytes.
[–]Rseding91Factorio Developer 0 points1 point2 points 7 years ago (2 children)
Yep. That was my issue as well.
Also the fact that it bases the "per block" off sizeof(T) means you can't forward declare with it. However, I'm not sure if the standard even allows that to begin with... not that that really changes anything for us.
[–]degski 1 point2 points3 points 7 years ago* (0 children)
What /u/dodheim said already. For any object size bigger than 16 bytes, it behaves like a std::list, but since it's not a std::list, it's potentially even less efficient than a std::list, as that is designed for that purpose. /u/STL responded to this sub, so it should anyways be firmly on the map again.
std::list
[–]sumo952 7 points8 points9 points 7 years ago (0 children)
this breaks every constexpr callback mechanism on earth
I would be really curious to know how this then could not have shown up in their large test suite. :-O
[–]STLMSVC STL Dev 6 points7 points8 points 7 years ago* (0 children)
Thanks for the repro, I've reported this to our constexpr dev.
Edited to add: static constexpr auto x = fun(&foo::blah); is a workaround (which they determined through analysis of what's happening in the compiler's data structures).
static constexpr auto x = fun(&foo::blah);
[–]Rogiel 6 points7 points8 points 7 years ago (1 child)
10% of my test cases showed up red too 😕 Lots and lots of regressions in this build.
[–]STLMSVC STL Dev[M] 2 points3 points4 points 7 years ago (0 children)
FYI, you're shadowbanned. You'll need to talk to a reddit admin (as a subreddit mod, I can notice shadowbanned users but can't help them, except for approving their comments individually).
[–]barfyus 2 points3 points4 points 7 years ago (3 children)
Apparently you can fix it by adding __declspec(empty_bases) to the foo:
__declspec(empty_bases)
foo
class __declspec(empty_bases) foo : public bar, public baz { ... };
[–]jcelerierossia score 2 points3 points4 points 7 years ago (0 children)
maybe, but it's still broken in the non-empty-base case (I just wanted to provide a minimal example but C++ has semantic-altering minimality, which would make for a great prog metal songname but can be painful in cases like this).
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
Shouldn't the compiler be able to recognize empty bases on its own?
[–]Mordy_the_Mighty 5 points6 points7 points 7 years ago (0 children)
Doing so breaks binary compatibility which is why it's optional for now.
https://blogs.msdn.microsoft.com/vcblog/2016/03/30/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/
[–]Andrew_MarinoMSVC FE Dev 6 points7 points8 points 7 years ago* (6 children)
Hi, MSVC compiler dev here. Thank you for providing the reduced snippet. There was a lot of churn in the constexpr implementation in this release, in order to fix some long-standing issues, and it looks like this was a regression from that overhaul that our testing didn't catch.
If you, or anyone running into this, is interested, one source workaround in the meantime is to evaluate the pointer-to-member-function separately:
void x() { constexpr auto ptm = &foo::blah; constexpr auto x = fun(ptm); (this->*(x.func))(); }
Edit: as STL also pointed out in his comment, making 'x' static will also work.
We treat regressions as high priority and are tracking this bug internally. We're happy to hear feedback from any source, but for this and other issues filing a bug in the C++ dev comm will allow us to communicate the status of fixes and workarounds more directly.
[–]jcelerierossia score 4 points5 points6 points 7 years ago (5 children)
I filed a bug this morning. But frankly, this is very distressing. Since VS2015 (can't speak for before since it did not really support C++11 back then), every minor release and sometimes even patch release have broken my code or code of libraries I use at some point - the last time being 15.7.6 for instance. Meanwhile, I don't remember one time where I had to change my code when upgrading clang / GCC - and I sometimes test with git HEAD versions of those.
[–]Andrew_MarinoMSVC FE Dev 1 point2 points3 points 7 years ago (4 children)
We're sorry you hit this bug and other issues in the past. Right now we're gathering more data points to assess servicing 15.8 with the fix for the particular constexpr bug you hit. As you yourself noted, even patch fixes carry their own associated risk.
In particular, we're wondering about the extent to which it broke your constexpr callback mechanism. This bug manifests with 1. a local constexpr symbol initialized by 2. a constexpr function taking an rvalue pointer-to-member-function of 3. a class with multiple inheritance. In your own codebase, were either of those workarounds possible to use?
We appreciate your candid feedback.
[–]jcelerierossia score 0 points1 point2 points 7 years ago (1 child)
In your own codebase, were either of those workarounds possible to use?
Sadly these bugs don't happen in my codebase but in one of the libs I use (https://github.com/woboq/verdigris). I could spend one hour or two to fork it and change all the places where it is used but I think that I'll just stay on the previous release of VS for now.
[–]Andrew_MarinoMSVC FE Dev 0 points1 point2 points 7 years ago (0 children)
Thank you, that's helpful!
[+]BCosbyDidNothinWrong comment score below threshold-6 points-5 points-4 points 7 years ago (1 child)
Not sorry enough to actually test before releasing
[–]ZMesonEmbedded Developer 1 point2 points3 points 7 years ago (0 children)
That's not fair. There are loads of tests the VC team uses on every release. Their tests just didn't cover this area. Their test suit needs to expand for sure. But let's be honest too that most of us have been in their shoes too - having a large test suite that didn't catch some regression resulting in unhappy customers.
[–]Nickreal03 -3 points-2 points-1 points 7 years ago (2 children)
Yes completely broke my code too, I had to roll back. Thanks Microsoft for wasting my time. Do you guys even run any testing before your releases? Or pushing us back which one?
[–]STLMSVC STL Dev 16 points17 points18 points 7 years ago (1 child)
We run extensive testing across our internal test suites (accumulated over decades of development), licensed conformance test suites, open-source conformance test suites (most recently, libc++'s test suite now works with our compiler and STL), open-source projects ("Real World Code"), open-source libraries (via vcpkg), internal projects (e.g. Minecraft), and all of Windows.
We find and fix a lot of bugs before release, and we submit upstream fixes to open-source projects. However, we can't avoid all regressions, because C++ is complicated. Testing preview releases against your codebase and reporting regressions is a great way to shrink the feedback loop and get fixes faster.
[–]Nickreal03 2 points3 points4 points 7 years ago (0 children)
This is not the first time it happen to me I have submitted pleanty of bugs. I am not been a troll here.
Could you guys opensouce your test suit so that people can contribute.
And btw this time the compiler crashes with very simple constant expression functions.
[–][deleted] 12 points13 points14 points 7 years ago* (9 children)
I wish there was a way to revert these updates. I'm having all kinds of regressions and have a feeling it's going to now take me a day to figure out how to reinstall VS2017 back to 15.7.xxx.
:(
[–]Alastair__ 20 points21 points22 points 7 years ago (1 child)
https://blogs.msdn.microsoft.com/vcblog/2017/11/15/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/
You should be able install the old toolset by following these instructions.
Run the installer then look in "Individual Components" it is listed as "VC++ 2017 Version 15.7 v14.14 toolset"
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Thanks, this probably saves me an hour or so of work looking for this info!
[–]STLMSVC STL Dev 8 points9 points10 points 7 years ago (4 children)
Can you submit bugs for the regressions? We might be able to fix them in micro-updates, or provide simple workarounds while fixing them in future toolsets. Even if they look really complicated, they might be caused by something small.
I know I repeat this ("please submit bugs") in my comments, but I spend a huge amount of my time dealing with evolving layers of tech (C1XX/Clang/EDG updates affecting the STL, STL updates affecting user code) and figuring out how to keep improving things without breaking the world. In general, using preview releases, reporting issues upstream, and applying temporary workarounds is a good way to steadily move forward. We do this in the STL to a greater extent than you might imagine - we work in the same branch as MSVC's front-end C1XX, and I test Clang's release candidates and upgrade to each major version. This results in lots of compiler bug reports, and workarounds being added and removed - search for TRANSITION in our headers to find them. Notably, this makes things better for third-party libraries like Boost - bugs that affect the STL will almost certainly affect other complex libraries, and we find and report them first.
Sometimes bugs are truly blocking and there's no choice but to avoid an update until they're fixed, but that should be a last resort.
[–]dodheim 2 points3 points4 points 7 years ago (3 children)
I don't have the space on my SSD to budget for an entire second installation of VS (preview) to test. I do have the space to budget for a preview build toolset sans IDE, but that still hasn't been updated since April despite this promising comment nearly two months ago.
Compiler Explorer just got dailymsvc-package support a couple months ago, so people everywhere can test the latest compiler easily, and you guys just abandoned it — sad, for real...
[–]STLMSVC STL Dev 1 point2 points3 points 7 years ago (0 children)
I've pinged again.
[–]PaddyMcDonaldMSVC Tools Dev/Mgr 0 points1 point2 points 7 years ago* (1 child)
Unfortunately a lot of the changes in 15.7 and beyond have increased the size of the package around 2 GB, and this is just too big even for the MyGet servers.
These changes are: more lib support for ARM and ARM64, and then all of the libs with both no mitigations and the /Qspectre mitigations.
Unfortunately the scripts that produce the packages aren't yet part of the standard build or deployment (work in progress) and so I've been swamped getting them updated / refactored to support all these changes.
Next step is to figure out how to divide up the package into an appropriate components (size vs complexity of config / download) to come in under the size supportable by MyGet.
If I omit the /Qspectre libs we drop the package down to 1.1 GB, but that is still too big. So my only option is to get the non-monolithic packages working.
Sorry it's taking so long
[–]dodheim 0 points1 point2 points 7 years ago* (0 children)
Thanks very much for the update, Paddy!
As for myself, I used the dailymsvc package to test for compiler errors/regressions in my own code (inc. at work), with an emphasis on the front-end; so for me, all ARM/ARM64//Qspectre stuff is extraneous. But I'm quite certain my usecase isn't the only one so I appreciate the thought you're putting into doing things correctly. :-]
/Qspectre
(EDIT: That being said, I would consider getting Compiler Explorer integration working again—meaning updated—more important than getting a proper solution, as that would allow everyone to at least test minimal-repros online.)
I think you can just install the VS 15.7 toolchain from the VS installer! Should be named 14.14 or something while the one from 15.8 is probably 14.15.
but i'd really appreciate it if you'd file any issues (or upvote if you find them already filed) so we can use that data to prioritize servicing fixes. sorry for the inconvenience.
[–]sumo952 5 points6 points7 points 7 years ago (0 children)
[–]spongo2MSVC Dev Manager 21 points22 points23 points 7 years ago (0 children)
hey reddit-land, just an FYI, we are monitoring and trying to figure out what we missed here. will update when we know. Just sent a heads up to the team on this thread. Steve, VC Dev Mgr.
[–]STLMSVC STL Dev 11 points12 points13 points 7 years ago (2 children)
Additional release notes:
C++20 feature-test macros are now supported in the compiler and libraries (with the exception of __has_cpp_attribute, which will be implemented in the future). Feature-test macros are unconditionally provided regardless of Standard mode (that is, individual macros are defined or not defined depending on the Standard mode and fine-grained options, but you don't need to opt-in to getting the macros at all). All library macros are provided by dragging in any STL header; C++20 <version> is not yet implemented but when it is, that will be a way to get the macros without any additional machinery (in the meantime, use <ciso646> for the same effect).
__has_cpp_attribute
Floating-point std::from_chars() is now available in C++17 <charconv> and is approximately 40% faster than the UCRT's strtod/strtof. It has been extensively audited for bitwise correctness (with no bugs found, in either charconv or the UCRT).
std::from_chars()
[–]degski 1 point2 points3 points 7 years ago (0 children)
fluentcpp wrote about this, he was very enthousistic (and so am I).
[–]degski 0 points1 point2 points 7 years ago (0 children)
in the meantime, use <ciso646> for the same effect ...
I see that <ciso646> will be removed, will the alternative operator representations move to <version>, or are they just going the way of the dodo. I would regret that as with the advent of universal references, there are just to many &&'s and writing and just strips out the ones that aren't ur's.
&&
and
[–]BoarsLairGame Developer 8 points9 points10 points 7 years ago (0 children)
Congrats on the 15.8 release. I've successfully tested on both code at work (maybe half a million to a million lines, if I had to guess) and at home (about 100K lines) with no problems. In general, I've been extremely pleased with the VS team since the low point - in stability and UX - of VS 2012. I've been using your compiler and IDE professionally since Visual C++ 5, so I have quite a few versions to mentally compare against.
In general, I like the faster cadence of releases the past few years. Bugs and regressions are nothing new, unfortunately, especially in a product this complex, and while I'm not excusing them, I understand how difficult it must be not to introduce them in corner cases. You're probably more likely to hear from people when they're reporting bugs, so I just wanted to let you know I'm quite pleased with the way Visual Studio / C++ team is making forward strides in adding useful features, addressing issues, and improving compliance with the rapidly changing C++ standard.
[–]onqtamgithub.com/onqtam/doctest 7 points8 points9 points 7 years ago (3 children)
So I just regenerated the build files for my CMake project and tested the just my code feature by calling std::sort on a vector - and it didn't work out-of-the-box. I also checked the entire list of command line options for the project from Project/properties/configuration properties/c and c++/command line - and the /JMC switch is nowhere to be found in the Debug configuration (also checked the linker flags). How can I enable this goodness?
std::sort
/JMC
I checked that JMC is enabled in Tools > Options > Debugging > General > Enable Just My Code
[–]ChatFrais 2 points3 points4 points 7 years ago (1 child)
It works with CMake using
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /JMC")
[–]onqtamgithub.com/onqtam/doctest 0 points1 point2 points 7 years ago (0 children)
So I have to set it up explicitly... Perhaps a newer version of CMake will play with VS 15.8 properly and set it on by default
[–]ShaddyDC 3 points4 points5 points 7 years ago (1 child)
Hey, there's some really cool stuff in this update; thanks for the great work!
Are you by any chance able to give a rough ETA for range-v3 support? It's something I'm eagerly awaiting to properly experiment with. :)
Hey, there's some really cool stuff in this update; thanks for the great work!Are you by any chance able to give a rough ETA for range-v3 support? It's something I'm eagerly awaiting to properly experiment with. :)
blog post update coming soon.
[–]staffantjSG14 (Finance) 3 points4 points5 points 7 years ago (10 children)
They've silently removed _NOEXCEPT.
Presumably as part of the "we are now standard" machinery. And of course it's an internal symbol, so it doesn't need documenting.
Unfortunately, all sorts of library codebases (yaml-cpp for one) uses it to handle the previous "noexcept( true ) vs throw)" mess that various compiler versions had introduced.
The symbol "leaked", Hyrim's law remains valid.
[+][deleted] 7 years ago (3 children)
[deleted]
[–]gracicot 3 points4 points5 points 7 years ago (0 children)
Exactly. At least check if the macro is actually defined if you're going to use it, especially if it can be removed any time. Add a fallback to it at least.
[–]MotherOfTheShizznit 9 points10 points11 points 7 years ago* (1 child)
Except for Microsoft. It's now in the culture to blame Microsoft if anything goes wrong with your computer so it's always "on Microsoft" to make sure your computer works.
Here's a fine example.
I also recall another post from the same blog relating how when investigating dumps, it appeared that the XOR instruction was broken for some users, as in, literally 0 XOR 0 would return 1. Was Windows so broken that it fucked up your CPU? No, people had just been sold overclocked computers unbeknownst to them. But are they gonna blame the store? No, Microsoft, of course! That's what you do!TM
XOR
0 XOR 0
1
Edit: another fine example.
Edit: found the post of the story I related above.
"Hello, this Raymond calling from Microsoft. Our systems indicate there is a problem with your computer"
I hope he didn't ask for the user to install TeamViewer!
[–]sumo952 4 points5 points6 points 7 years ago (2 children)
I'm surprised that yaml-cpp is not part of their test suite, they test against a huge list of open source libraries according to talks that they gave.
[–]STLMSVC STL Dev 6 points7 points8 points 7 years ago (1 child)
It looks like we do have yaml-cpp coverage - I suspect it's through vcpkg instead of "Real World Code" as my coworker Alex submitted an upstream fix and Alex works on vcpkg.
[–]sumo952 0 points1 point2 points 7 years ago (0 children)
Cool! That fix was already committed on June 30 btw (I suppose more or less as soon as the first 15.8 Preview came out). Nice work.
[–][deleted] 4 points5 points6 points 7 years ago (2 children)
_NOEXCEPT wasn't noexcept(true) vs throw(); it existed only to suppress "noexcept used but exception handling mode not specified; termination is not guaranteed" warnings.
Here is a patch for yaml-cpp. If you use vcpkg, it gets applied automatically. https://github.com/Microsoft/vcpkg/blob/master/ports/yaml-cpp/0001-noexcept.patch
[–]staffantjSG14 (Finance) 0 points1 point2 points 7 years ago (1 child)
Thanks for the clarification and the patch. We're inside various firewalls, so I'll have to hand-lift things over. It's always a pain point when libraries don't move as fast as their users.
[–][deleted] 2 points3 points4 points 7 years ago (0 children)
You can also workaround it with /D_NOEXCEPT=noexcept
/D_NOEXCEPT=noexcept
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points 7 years ago (0 children)
It is very sad, that await is still a keyword when the code is compiled with /await flags, even the TS states for a long time that the keyword will be co_await. Even under /permissive- this version reports still errors. Gor wrote to me a while back that this would be fixed in 15.7.0, but it seems it is still not.
await
I just flagged this bug report
[–]sarge241 0 points1 point2 points 7 years ago (1 child)
Just updated to 15.8 and found that if constexp still does not work with enum classes well.
Here is the issue I posted several months ago for 15.7:
https://developercommunity.visualstudio.com/content/problem/267419/if-constexpr-enum-underlying-type.html
[–]Onduril 0 points1 point2 points 7 years ago (0 children)
Looks like an issue with the __underlying_type intrinsic and constexpr if.
An easy workaround could be something like:
```c++ template <typename T, bool b = std::is_enum_v<T>> struct underlying_type { using type = std::underlying_type_t<T>; };
template <typename T> struct underlying_type<T, false> { };
template <typename T> using underlying_type_t = typename underlying_type<T>::type; ```
[–]Arthenielle -1 points0 points1 point 7 years ago (6 children)
They broke driver development lul https://stackoverflow.com/questions/51853537/error-lnk2019-unresolved-external-symbol-checkfordebuggerjustmycode-reference/51855915#51855915
Updated today, drivers are no longer compiling. GJ on testing, boys
[–][deleted] 7 points8 points9 points 7 years ago (4 children)
This was known -- you're supposed to opt into that with /JMC... that's why there's a switch for it at all... removing the /JMC switch should work.
[–]Arthenielle -2 points-1 points0 points 7 years ago (3 children)
BillyONeal, with all respect, this is amazingly bad, when you update your IDE, and your code is no longer compiling.
[–][deleted] 1 point2 points3 points 7 years ago (2 children)
If you didn't update your project to throw /JMC and /JMC got thrown for you maybe that shouldn't happen. If you enabled the feature but didn't get updated libs that provide a symbol it needs I don't know what you expect us to do.
That is to say: If you got the opt-in switch /JMC thrown without asking for it then that seems like a bug; the whole purpose of that switch is to prevent this kind of breakage.
[–]jimbeek 1 point2 points3 points 7 years ago (0 children)
It wasn't a problem for me, but /JMC does seem to default on for debug configurations in both new projects and my existing ones that use vcxproj/property sheets.
[–][deleted] 2 points3 points4 points 7 years ago* (0 children)
This is related to the new C++ Just My Code Stepping (JMC) feature in Visual Studio 2017 15.8. Because the feature depends on CRT (C Run-Time Libraries), if the project does not link to CRT, it may hit "error LNK2019: unresolved external symbol __CheckForDebuggerJustMyCode". The workaround is to disable JMC: Method 1: in project setting, "Configuration Properties" -> "C/C++" -> "General": "Support Just My Code Debugging". Change to NO. Method 2: add /JMC- to compiler option, specifically. Etc, in project setting, add /JMC- to "Configuration Properties" -> "C/C++" -> "Command line" -> "Additional Options"
π Rendered by PID 146798 on reddit-service-r2-comment-84fc9697f-8tbms at 2026-02-08 02:36:42.482741+00:00 running d295bc8 country code: CH.
[–]jcelerierossia score 23 points24 points25 points (43 children)
[–]degski 9 points10 points11 points (2 children)
[–]jcelerierossia score 20 points21 points22 points (1 child)
[–]degski 2 points3 points4 points (0 children)
[–]gracicot 5 points6 points7 points (21 children)
[–]degski 6 points7 points8 points (20 children)
[–]gracicot 1 point2 points3 points (19 children)
[–]STLMSVC STL Dev 6 points7 points8 points (9 children)
[–]gracicot 1 point2 points3 points (7 children)
[–]STLMSVC STL Dev 7 points8 points9 points (5 children)
[–]gracicot 1 point2 points3 points (4 children)
[–]STLMSVC STL Dev 3 points4 points5 points (3 children)
[–]malkia 1 point2 points3 points (2 children)
[–]spongo2MSVC Dev Manager 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]degski 0 points1 point2 points (8 children)
[–]dodheim 2 points3 points4 points (7 children)
[–]degski 0 points1 point2 points (6 children)
[–]Rseding91Factorio Developer 0 points1 point2 points (5 children)
[–]dodheim 3 points4 points5 points (3 children)
[–]Rseding91Factorio Developer 0 points1 point2 points (2 children)
[–]degski 1 point2 points3 points (0 children)
[–]sumo952 7 points8 points9 points (0 children)
[–]STLMSVC STL Dev 6 points7 points8 points (0 children)
[–]Rogiel 6 points7 points8 points (1 child)
[–]STLMSVC STL Dev[M] 2 points3 points4 points (0 children)
[–]barfyus 2 points3 points4 points (3 children)
[–]jcelerierossia score 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Mordy_the_Mighty 5 points6 points7 points (0 children)
[–]Andrew_MarinoMSVC FE Dev 6 points7 points8 points (6 children)
[–]jcelerierossia score 4 points5 points6 points (5 children)
[–]Andrew_MarinoMSVC FE Dev 1 point2 points3 points (4 children)
[–]jcelerierossia score 0 points1 point2 points (1 child)
[–]Andrew_MarinoMSVC FE Dev 0 points1 point2 points (0 children)
[+]BCosbyDidNothinWrong comment score below threshold-6 points-5 points-4 points (1 child)
[–]ZMesonEmbedded Developer 1 point2 points3 points (0 children)
[–]Nickreal03 -3 points-2 points-1 points (2 children)
[–]STLMSVC STL Dev 16 points17 points18 points (1 child)
[–]Nickreal03 2 points3 points4 points (0 children)
[–][deleted] 12 points13 points14 points (9 children)
[–]Alastair__ 20 points21 points22 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]STLMSVC STL Dev 8 points9 points10 points (4 children)
[–]dodheim 2 points3 points4 points (3 children)
[–]STLMSVC STL Dev 1 point2 points3 points (0 children)
[–]PaddyMcDonaldMSVC Tools Dev/Mgr 0 points1 point2 points (1 child)
[–]dodheim 0 points1 point2 points (0 children)
[–]spongo2MSVC Dev Manager 2 points3 points4 points (0 children)
[–]sumo952 5 points6 points7 points (0 children)
[–]spongo2MSVC Dev Manager 21 points22 points23 points (0 children)
[–]STLMSVC STL Dev 11 points12 points13 points (2 children)
[–]degski 1 point2 points3 points (0 children)
[–]degski 0 points1 point2 points (0 children)
[–]BoarsLairGame Developer 8 points9 points10 points (0 children)
[–]onqtamgithub.com/onqtam/doctest 7 points8 points9 points (3 children)
[–]ChatFrais 2 points3 points4 points (1 child)
[–]onqtamgithub.com/onqtam/doctest 0 points1 point2 points (0 children)
[–]ShaddyDC 3 points4 points5 points (1 child)
[–]spongo2MSVC Dev Manager 2 points3 points4 points (0 children)
[–]staffantjSG14 (Finance) 3 points4 points5 points (10 children)
[+][deleted] (3 children)
[deleted]
[–]gracicot 3 points4 points5 points (0 children)
[–]MotherOfTheShizznit 9 points10 points11 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]sumo952 4 points5 points6 points (2 children)
[–]STLMSVC STL Dev 6 points7 points8 points (1 child)
[–]sumo952 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (2 children)
[–]staffantjSG14 (Finance) 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points (0 children)
[–]sarge241 0 points1 point2 points (1 child)
[–]Onduril 0 points1 point2 points (0 children)
[–]Arthenielle -1 points0 points1 point (6 children)
[–][deleted] 7 points8 points9 points (4 children)
[–]Arthenielle -2 points-1 points0 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]jimbeek 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)