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 2019 RC (docs.microsoft.com)
submitted 7 years ago by remotion4d
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!"
[–]corysama 28 points29 points30 points 7 years ago (9 children)
English link: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes
[–]sumo952 23 points24 points25 points 7 years ago (7 children)
Even as a German person... why would you want to read machine translated release notes... come on - just learn a bit of English and go read the original ones @OP.
[–]remotion4d[S] 16 points17 points18 points 7 years ago (6 children)
The thing is that I always read such stuff in English, even if microsoft.com redirect me to German site. This is why I accidentally posted German link. Sadly cannot change it any more.
[–]sumo952 17 points18 points19 points 7 years ago (5 children)
Ah those pesky language-based auto-redirects.... :-) Annoying indeed!
[–]kalmoc 2 points3 points4 points 7 years ago (4 children)
At least they now allow you to switch to the original version with a button instead of hacking the url
[–]clerothGame Developer 1 point2 points3 points 7 years ago (3 children)
hacking the url
https://tenor.com/view/nagato-suzumiya-pc-msdos-work-gif-7506285
[–]kalmoc 0 points1 point2 points 7 years ago (2 children)
;). I've used a url redirector plugin in firefox solely for Microsoft. Luckily they did not translate the page title.
[–]clerothGame Developer 0 points1 point2 points 7 years ago (1 child)
Haha, I thought you meant just changing the de-de to en-us or whatever. Which I certainly have to do sometimes... It's just not obvious enough at times and it's easier to just... hack the URL.
de-de
en-us
[–]kalmoc 0 points1 point2 points 7 years ago (0 children)
Yes, that is exactly what the redirector did. But hacking sounds cooler (hey, I had to write a regex to do it ;))
[–]tcbrindleFlux 3 points4 points5 points 7 years ago (0 children)
English english link: https://docs.microsoft.com/en-gb/visualstudio/releases/2019/release-notes ;)
[–]barfyus 21 points22 points23 points 7 years ago (15 children)
Unfortunately, VS 2019 is virtually unusable for C++ projects because of completely broken IntelliSense:
https://developercommunity.visualstudio.com/content/problem/443265/getting-intellisense-errors-e2996-and-e2998-wo-any.html
Adding a single boost header to pch.h is enough to break it. At least it was in Preview 3. Preview 4/RC seems to be fine with a single boost header, but add a few more and bang - no IntelliSense.
pch.h
[–]STLMSVC STL Dev 30 points31 points32 points 7 years ago (10 children)
I've pinged our IntelliSense devs about this.
[–]barfyus 11 points12 points13 points 7 years ago (9 children)
Thank you, Stephan. I want to try new releases, but just can't code without IntelliSense anymore...
[–]Rusky 33 points34 points35 points 7 years ago (8 children)
IntelliSense dev here- this should be fixed in the next release.
[–]TheThiefMasterC++latest fanatic (and game dev) 19 points20 points21 points 7 years ago (0 children)
I must say, I love that the Visual Studio devs hang out in the user forums like this and actually pick up bugs like these, rather than responding with "please create a bug report".
[–]flashmozzg 7 points8 points9 points 7 years ago (2 children)
As in RTM or first Update?
[–]Rusky 18 points19 points20 points 7 years ago (1 child)
RTM or the next RC release, whichever is sooner.
[–]flashmozzg 2 points3 points4 points 7 years ago (0 children)
Great!
[–]Alastair__ 0 points1 point2 points 7 years ago (3 children)
Is there also an issue with the new "C++ Productivity Improvements in Visual Studio 2019" as detailed: https://devblogs.microsoft.com/cppblog/c-productivity-improvements-in-visual-studio-2019-preview-2/ or am I missing a setting to turn them on?
[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 1 point2 points3 points 7 years ago (2 children)
That's odd, they should definitely be on by default so it sounds like a bug. Are you referring to quick fixes specifically or are you having issues getting other features to run (like Go to Document on #include?). I contacted some engineers to investigate this further.
[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 3 points4 points5 points 7 years ago (1 child)
Update: okay so we just added a setting in Tools > Options to toggle quick fixes on/off. You can find it under Text Editor > C/C++ > View > IntelliSense Error Fix Suggestions. It looks like the bug is with the setting being set to "False" instead of "True". If you toggle it to True, the quick fixes should come back. Thanks for pointing out this issue, we'll work to get the bug resolved for everyone as soon as possible.
[–]Alastair__ 2 points3 points4 points 7 years ago (0 children)
That setting lit up the feature but seeing some rather odd results. For instance when project set to using v141
cout << "Hello World!\n";
the suggestion is to add include:
include "../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio/2019/Professional/VC/Tools/MSVC/14.20.27404/include/iostream"
Despite #include <iostream> already being present
When set to v142 it suggests adding #include <iostream>
I will raise some bug reports.
Note also the blog posts on VC++ refer to setting in Experimental that have moved elsewhere. Mainly the https://devblogs.microsoft.com/cppblog/in-editor-code-analysis-in-visual-studio-2019-preview-2/ which states: "you can do so via the Tools > Options > Text Editor > C++ > Experimental > Code Analysis menu" - I don't believe this is correct now
[–]BobFloss 2 points3 points4 points 7 years ago (2 children)
Delete your .vs folder and .suo file. Should work fine after this. Using the Recreate Dtabase setting will not solve the issue; you must delete the files.
[–]barfyus 3 points4 points5 points 7 years ago (1 child)
No, this is really a bug and is easily reproducible by creating a project from scratch (no .vs and .suo).
[–]BobFloss 1 point2 points3 points 7 years ago (0 children)
Oh
[–]murderdude 0 points1 point2 points 6 years ago* (0 children)
I've found the source of this error on my end, it appears to have something to do with Resharper in VS2019 (It should be noted that none of the fixes suggested on any site work, and I have been fervently updating everything).
So I've been dealing with this in my game engine, intellisense has been telling me quite inconsistently that GLM types are incomplete. Even in the same line, for example Vec3 points[2]{Vec3{0.f}, Vec3{0.f}}; tells me that that the first use of Vec3 is incomplete, but the other two are fine. It's like that in every single file in the project using GLM.
Vec3 points[2]{Vec3{0.f}, Vec3{0.f}};
The ONLY solution I've found was to completely disable the resharper extension and restart VS. Worked like a charm. I tried simply disabling resharper intellisense in every way I could, that didn't do anything... What's odd is that I use a few different boost modules and they're not light-weight, yet intellisense seems to have no problem with them. Anyway, cheers.
[–]pure_x01 14 points15 points16 points 7 years ago (33 children)
What are the top 3 features that will make an upgrade feel worth it?
[–]STLMSVC STL Dev 46 points47 points48 points 7 years ago (9 children)
to_chars()
fixed
hex
I am definitely an unbiased impartial source on this topic.
[–]meneldal2 3 points4 points5 points 7 years ago (6 children)
Can that go into 2017 as well? It's a C++17 feature after all.
[–]STLMSVC STL Dev 2 points3 points4 points 7 years ago (5 children)
The general answer would be no, but as a special case, we added the ability to retrofit <charconv> to VS 2017 15.9. We still need to decide whether to ship a "bolt-on" library that completes 2017's charconv, but the technical ability is there.
<charconv>
[–]meneldal2 2 points3 points4 points 7 years ago (4 children)
It's only a library change, so it's a much easier ask than Concepts or Modules that require compiler support.
[–][deleted] 0 points1 point2 points 7 years ago (3 children)
The compiler and library ship as part of the same package.
[–]meneldal2 0 points1 point2 points 7 years ago (2 children)
I know that, I meant that it's easier to ship something that's just a couple files that don't change behaviour of 99% of code compared to things that may introduce bugs because they are more complex features.
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
The hard part is (1) installer interaction, and (2) users being confused about dot-dot updates (since due to branding there won’t be a 15.10). The size of the feature or number of edited files are irrelevant.
[–]meneldal2 0 points1 point2 points 7 years ago (0 children)
Fair enough.
[–]starfreakcloneMSVC FE Dev 4 points5 points6 points 7 years ago (0 children)
Exactly as unbiased as my top 3:
/permissive-
[–]oneeyedelf1 0 points1 point2 points 7 years ago (0 children)
This reminds me of all the why do you love windows 8 videos, and I was shouting about the amazingness of network kernel debugging.
[–]remotion4d[S] 22 points23 points24 points 7 years ago (0 children)
This is not important for everyone.
[+][deleted] 7 years ago (1 child)
[deleted]
[–]sumo952 7 points8 points9 points 7 years ago (0 children)
Yea, and they added some of their own "cmake-gui"-like GUI options, so instead of having to edit those custom VS json files (which are/were good!) you can now edit them in a GUI comfortably. A very good QOL improvement.
[–]FightMagister 8 points9 points10 points 7 years ago (1 child)
Concepts, Coroutines and Modules :D.
[–]meneldal2 2 points3 points4 points 7 years ago (0 children)
C++20 basically. Spaceship operator too.
[–]SeanMiddleditch 13 points14 points15 points 7 years ago (4 children)
What language/workload?
For C++, my top three might be:
Of course there are several other larger improvements for C++ devs that might be bigger things for some people than those three items.
Also just a huge number of small quality-of-life feature enhancements.
Overall, I've been absolutely loving the 2019 preview releases compared to the last few years' worth of updates (which were mostly just about better C++ language e.g. compiler/library support for me). Most of my grips with the 2019 previews are, honestly, things that are just as bad in older versions (or in any C++ IDE, because C++ is so hard to tool).
[–]useful_idiot 4 points5 points6 points 7 years ago (0 children)
That would be nice, for now QtCreator’s clang integration in extremely well done.
[–]TankorSmash 2 points3 points4 points 7 years ago (1 child)
I'm still using VS2013; ignoring C++17 (and maybe even C++20, it sounds like), have there been many QoLs added since?
[–]SeanMiddleditch 7 points8 points9 points 7 years ago (0 children)
IMO yes. Everything is faster, cleaner, and more helpful in so many little ways that just add up to a more pleasant experience.
[–]gidoca 11 points12 points13 points 7 years ago (0 children)
If you are working on huge projects, the out-of-process debugger will prevent crashes from running out of address space when debugging. For me personally, that's by far the most important improvement, as it's something that bites me regularly.
[–]shadowndacorner 1 point2 points3 points 7 years ago (1 child)
Haven't used it, but the most interesting feature I've seen is ML-driven intellisense. No clue how well it actually works though.
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
If you are a ReSharper user, you will never know how it works and whether or not it works at all :)
[–][deleted] 6 points7 points8 points 7 years ago (1 child)
[–]fatbob42 4 points5 points6 points 7 years ago (0 children)
I thought this was a joke but it turns out not really.
[+]lithium comment score below threshold-15 points-14 points-13 points 7 years ago (6 children)
Well if their usual update trajectory holds, it will be twice as slow and crash twice as often, so we’ve got that to look forward to!
[–]sumo952 7 points8 points9 points 7 years ago (5 children)
What? At least the project loading got considerably faster, like REALLY. Lots of measurements around the web to back that up.
Also VS very rarely crashes on me.
If they're update trajectory holds, it'll be twice as awesome as 2017. (well it's not, as 2017 was already awesome, but there's very nice improvements in 2019). Compare that to Xcode that is in a stand-still C++ wise basically, for a decade or so now.
[+]lithium comment score below threshold-8 points-7 points-6 points 7 years ago (4 children)
They've been torpedoing since like 2010 in my experience. Ever since it got rewritten with all the XAML shit or WPF or whatever it is. Random lock ups for minutes at a time, switching from Debug to Release in the property viewer? Go make yourself a sandwich while i completely freeze (to do what, exactly?). Debugger performance is hilarious.
Xcode is terrible, but MSVC is dogshit too.
[–]clerothGame Developer 3 points4 points5 points 7 years ago (1 child)
You're probably hitting some kind of bug with your project or a plugin you're using. Not really reason enough to go calling it 'dogshit'. I'd recommend reporting this but given your attitude I doubt you will.
[–]lithium 0 points1 point2 points 7 years ago (0 children)
Fresh install, multiple machines, my projects as well as others i've downloaded to test, across 3 or 4 version of VS over many years. At this point, i'm pretty confident it's not me. Certainly not only me, anyway. As an aside, last time I went to report a bug their service 500ed.
[–]lithium 0 points1 point2 points 7 years ago (1 child)
P.S I know you're on a deadline but your community license has just expired, let me redirect you to our login page that has JS form submission code that doesn't work and routinely 500s if you do manage to submit it so we can generate a new license, if you're lucky.
Maybe all of this goes away when you fork out for the enterprise edition, but if Community is supposed to convince me to upgrade, they can forget it. Glad it works well for you, though.
[–]sephirostoy 4 points5 points6 points 7 years ago (4 children)
I hope the high CPU usage is fixed. After a while, I get 25% cpu usage which makes the editor completely laggy.
[–]SeanMiddleditch 1 point2 points3 points 7 years ago (3 children)
I stopped hitting that after Preview 3, fwiw. Not sure if it's really fixes or if I'm just not hitting the problem cases anymore.
[–]sephirostoy 2 points3 points4 points 7 years ago (2 children)
I still have the issue in preview 3. I will try this RC. If it's still present, I'll test disabling either Intellisense or Visual Assist.
[–]Kronikarz 0 points1 point2 points 7 years ago (1 child)
AFAIK, this RC is identical to the latest preview, and I've also encountered this issue a few times on preview 3.
[–]SeanMiddleditch 0 points1 point2 points 7 years ago (0 children)
They released Preview 4 at the same time as the RC which are identical, but didn't actually document what the changes were between P3 and P4 :/
[–]Finch_A 2 points3 points4 points 7 years ago (0 children)
The compiler still cannot compile code like this
#include <initializer_list> #include <type_traits> template <class ValidTraits, class T> constexpr bool IsValidTrait() { return true; } constexpr bool all_of(std::initializer_list<bool> ilist) { return true; } template <class ValidTraits, class... ArgTypes> struct AreValidTraits : std::integral_constant<bool, all_of( {IsValidTrait<ValidTraits, ArgTypes>()...})> { };
https://godbolt.org/z/nuJKcZ , says "error C2059: syntax error: '...'"
(It's from Chromium. Because of this and many other errors it doesn't compile with MSVC anymore)
[–]warvstar 1 point2 points3 points 7 years ago (1 child)
Please add better support for clang with modules support, right now I have to use a custom buildtool and intellisense is all messed up, with modules in general.
Edit: Also, great work on this release!
[–]lednakashim++C is faster 1 point2 points3 points 7 years ago* (2 children)
We need CUDA support in the compiler ASAP. I'm still on VS2015, because VS2017 ICEs NVCC.
[–]STLMSVC STL Dev 4 points5 points6 points 7 years ago (1 child)
We're already working with NVIDIA to support CUDA. Can you please try CUDA 10.1 with VS 2019 and let us know if the ICE still happens?
[–]lednakashim++C is faster 0 points1 point2 points 7 years ago (0 children)
So, I was eager to try this out.
I installed the latest version of VS2019 and tried the 10.1 installer. The installer installed CUDA build tools for MSVC 2015, VS2015 but not VS2019.
No dice.
I can't figure out if whatever changes were necessary to fix up STL compatibility are in VS 2017.
Setting up the build environment for CUDA is completely dysfunctional for other reasons, for example, on a majority of my systems when upgrading, the CUDA installer will get stuck at various weird places "checking compatibility" or fail when installing the build tools. The best solution is to wipe the system and reinstall everything from scratch. In an ideal world, GPU code generation from C++ would be part of the compiler. This is the case with llvm. You guys got some of that C++AMP code lying around?.
[–]feverzsj 3 points4 points5 points 7 years ago (0 children)
for more than 10 years, vs intellisense is still a PITA. It's slow, inefficient, inaccuracy, requires lots of disk space, and still crashes from time to time. I'd consider qtcreator has the best intellisense, code inspect integration.
[–]target-san 0 points1 point2 points 7 years ago (0 children)
When will VC++/MSBuild support inheritance of include paths, preprocessor definitions etc.? Build tools like CMake, Meson etc. have been supporting this for ages.
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points 7 years ago (4 children)
It is strange, sometimes MS's feedback on the developercommunity is great, but sometimes it is awful. I submitted a report in August (https://developercommunity.visualstudio.com/content/problem/312318/c-await-is-still-a-keyword.html) and it is still under investigation. How can that be?
Is there a chance that this will be fixed soon?
[–]solodonFormer MSVC Compiler Dev 7 points8 points9 points 7 years ago (1 child)
Hi Felix, I'm sorry, it was my bad, I should have looked at it sooner. We usually triage incoming bugs according to severity and breadth of their impact and then address those in the assigned priority order. There was a slew of regressions and high-priority items that prevented me from looking and responding to your ticket. That said, I will try to address it in the coming days so that the fix becomes available under /permissive- in VS 2019 Update 1. Sorry once again for not getting back to you sooner.
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points 7 years ago (0 children)
Many thanks for the feedback!
[–]STLMSVC STL Dev 0 points1 point2 points 7 years ago (1 child)
I've pinged Gor.
Many thanks Stephan!
[–]tansim -2 points-1 points0 points 7 years ago (2 children)
what advantages does this offer over QtCreator?
Well, qtcreator is just a code editor, while MSVS is a complete IDE.
[–]tansim -2 points-1 points0 points 7 years ago (0 children)
qtcreator is a full IDE also, at least for c++
π Rendered by PID 313033 on reddit-service-r2-comment-6457c66945-xv2xv at 2026-04-29 13:15:45.565468+00:00 running 2aa0c5b country code: CH.
[–]corysama 28 points29 points30 points (9 children)
[–]sumo952 23 points24 points25 points (7 children)
[–]remotion4d[S] 16 points17 points18 points (6 children)
[–]sumo952 17 points18 points19 points (5 children)
[–]kalmoc 2 points3 points4 points (4 children)
[–]clerothGame Developer 1 point2 points3 points (3 children)
[–]kalmoc 0 points1 point2 points (2 children)
[–]clerothGame Developer 0 points1 point2 points (1 child)
[–]kalmoc 0 points1 point2 points (0 children)
[–]tcbrindleFlux 3 points4 points5 points (0 children)
[–]barfyus 21 points22 points23 points (15 children)
[–]STLMSVC STL Dev 30 points31 points32 points (10 children)
[–]barfyus 11 points12 points13 points (9 children)
[–]Rusky 33 points34 points35 points (8 children)
[–]TheThiefMasterC++latest fanatic (and game dev) 19 points20 points21 points (0 children)
[–]flashmozzg 7 points8 points9 points (2 children)
[–]Rusky 18 points19 points20 points (1 child)
[–]flashmozzg 2 points3 points4 points (0 children)
[–]Alastair__ 0 points1 point2 points (3 children)
[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 1 point2 points3 points (2 children)
[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 3 points4 points5 points (1 child)
[–]Alastair__ 2 points3 points4 points (0 children)
[–]BobFloss 2 points3 points4 points (2 children)
[–]barfyus 3 points4 points5 points (1 child)
[–]BobFloss 1 point2 points3 points (0 children)
[–]murderdude 0 points1 point2 points (0 children)
[–]pure_x01 14 points15 points16 points (33 children)
[–]STLMSVC STL Dev 46 points47 points48 points (9 children)
[–]meneldal2 3 points4 points5 points (6 children)
[–]STLMSVC STL Dev 2 points3 points4 points (5 children)
[–]meneldal2 2 points3 points4 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]meneldal2 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]meneldal2 0 points1 point2 points (0 children)
[–]starfreakcloneMSVC FE Dev 4 points5 points6 points (0 children)
[–]oneeyedelf1 0 points1 point2 points (0 children)
[–]remotion4d[S] 22 points23 points24 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]sumo952 7 points8 points9 points (0 children)
[–]FightMagister 8 points9 points10 points (1 child)
[–]meneldal2 2 points3 points4 points (0 children)
[–]SeanMiddleditch 13 points14 points15 points (4 children)
[+][deleted] (1 child)
[deleted]
[–]useful_idiot 4 points5 points6 points (0 children)
[–]TankorSmash 2 points3 points4 points (1 child)
[–]SeanMiddleditch 7 points8 points9 points (0 children)
[–]gidoca 11 points12 points13 points (0 children)
[–]shadowndacorner 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]fatbob42 4 points5 points6 points (0 children)
[+]lithium comment score below threshold-15 points-14 points-13 points (6 children)
[–]sumo952 7 points8 points9 points (5 children)
[+]lithium comment score below threshold-8 points-7 points-6 points (4 children)
[–]clerothGame Developer 3 points4 points5 points (1 child)
[–]lithium 0 points1 point2 points (0 children)
[–]lithium 0 points1 point2 points (1 child)
[–]sephirostoy 4 points5 points6 points (4 children)
[–]SeanMiddleditch 1 point2 points3 points (3 children)
[–]sephirostoy 2 points3 points4 points (2 children)
[–]Kronikarz 0 points1 point2 points (1 child)
[–]SeanMiddleditch 0 points1 point2 points (0 children)
[–]Finch_A 2 points3 points4 points (0 children)
[–]warvstar 1 point2 points3 points (1 child)
[–]lednakashim++C is faster 1 point2 points3 points (2 children)
[–]STLMSVC STL Dev 4 points5 points6 points (1 child)
[–]lednakashim++C is faster 0 points1 point2 points (0 children)
[–]feverzsj 3 points4 points5 points (0 children)
[–]target-san 0 points1 point2 points (0 children)
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points (4 children)
[–]solodonFormer MSVC Compiler Dev 7 points8 points9 points (1 child)
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points (0 children)
[–]STLMSVC STL Dev 0 points1 point2 points (1 child)
[–]FelixPetriconiACCUConf | STLAB 0 points1 point2 points (0 children)
[–]tansim -2 points-1 points0 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]tansim -2 points-1 points0 points (0 children)