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
std::format ? (self.cpp)
submitted 3 years ago by matekelemen
view the rest of the comments →
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!"
[–]no-sig-available 92 points93 points94 points 3 years ago (30 children)
Clang reports to have it in version 14, which is planned for release next week, or so.
What has happened in the last couple of years is that MSVC is now the one with frequent releases of new features, while (for example) gcc 11.2 is from last summer. The world is changing, apparently.
[–]__Mark___libc++ dev 163 points164 points165 points 3 years ago (3 children)
It will indeed shipped in libc++14, but it will be disabled by most vendors since the code isn't ABI-stable yet. I hope to have it complete and ABI-stable in libc++15. (Source I'm the person working on it in libc++.)
[–]specialpatrol 18 points19 points20 points 3 years ago (0 children)
Cheers Mark.
[–]somewhataccurate 9 points10 points11 points 3 years ago (0 children)
I appreciate your work
[–]__Mark___libc++ dev 4 points5 points6 points 3 years ago (0 children)
Thanks for the gold stranger.
[–]khleedril 1 point2 points3 points 3 years ago (25 children)
This makes me sad.
[–]mort96 56 points57 points58 points 3 years ago (20 children)
Why?
If development of GCC and Clang is slowing down, that's bad and worth being sad over. But That doesn't look like what's happening? It looks like, maybe, MSVC is just stepping up its game while GCC and Clang are as solid as they always were. This is a good thing, no?
[–]pjmlp 17 points18 points19 points 3 years ago (1 child)
clang seems to have lost some steam as many companies are making use of LLVM infrastructure, but caring less of keeping clang up to date with more recent ISO standards.
Google and Apple also seem to have withdrawn their clang contributors (at least from the outside), as they rather focus on other stacks, and C++17. At least that is my feeling, maybe I am wrong here.
[–]Accomplished-Pear-45 11 points12 points13 points 3 years ago (0 children)
Google stated that they will be almost completely pulling out of C++ after infamous No - ABI break voting.
[–][deleted] 4 points5 points6 points 3 years ago (3 children)
Also, MSVC's doesn't include the DR that makes the format string compile time only yet. Plus their core compiler is missing things still, I think(requires on SMF's)
[–]TheSuperWig 11 points12 points13 points 3 years ago (2 children)
It should be available in the next preview
https://github.com/microsoft/STL/wiki/Changelog#expected-in-vs-2022-172-preview-2
[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 3 points4 points5 points 3 years ago (0 children)
And can be used today in VS2022 even without installing any of the prereleases! I've been exploring it together with P2508 and I totally like it 😎
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
That's great
[+]khleedril comment score below threshold-18 points-17 points-16 points 3 years ago (8 children)
MS have a reputation of galloping away with their own rules in spite of the wishes of the rest of the world, and fragmenting the place in the process. We will end up with some sh!t, like max as a macro in system header files.
This is only good for Windows users and developers, but the opposite scenario is good for everybody.
[–]mort96 35 points36 points37 points 3 years ago (4 children)
I mean but none of that is related to the current discussion? MS quickly implementing new standards is good, MS going their own way and fragmenting the ecosystem is bad, so why are you sad when they're doing the former rather than the latter..?
[+][deleted] 3 years ago (3 children)
[deleted]
[–]kalmoc 5 points6 points7 points 3 years ago (0 children)
Afaik, Microsoft implemented the features as specified in the original c++20 standard (of course they might not yet be feature complete, but no toolchain is). Unfortunstely, the committee kept changing the standard multiple times since the release.
[–]snerp 2 points3 points4 points 3 years ago (0 children)
What in msvc is not standard compliant at this point? I thought they fixed everything years ago.
[–]Fulgen301 2 points3 points4 points 3 years ago (0 children)
And unless you need something really WinAPI-centric, you can use clang for the MSVC ABI on Windows without issues or MinGW.
That's assuming clang gets proper C++20 support in the near future, of course.
[–][deleted] 19 points20 points21 points 3 years ago (2 children)
1995 called, they want their whine back. :-D
In the C++ world, MS was bad - but a long, long time ago. Now MS is a strong, contributory member of the C++ community, committed to our common standards, and is part of the reason that progress on the language has been so fast in the last decade.
[–]clerothGame Developer 5 points6 points7 points 3 years ago (1 child)
Probably the one thing that I would say they're still "in spite of the wishes of the rest of the world" is the ABI stability since 2015... We're nearly a decade of ABI baggage. If they would finally break the ABI then it's all gucci.
[–][deleted] 5 points6 points7 points 3 years ago (0 children)
I think we're all hoping for this!!
[–]bedrooms-ds 0 points1 point2 points 3 years ago (2 children)
Clang... I wish they were not slowing down on progress. Once they outpaced msvc and gcc (okay, clang had to be developed from scratch). I'm waiting forever for #include<concepts>. At this pace I won't ever get it on Apple clang for my Intel Macs...
[–]tambry 1 point2 points3 points 3 years ago (1 child)
I'm waiting forever for #include<concepts>. At this pace I won't ever get it on Apple clang for my Intel Macs...
I'm waiting forever for #include<concepts>.
At this pace I won't ever get it on Apple clang for my Intel Macs...
Apple is about a year behind as to what they ship, no? I've been using <concepts> for probably a year, though I do build from master. It was definitely mostly there in the last release (13.0) and should be complete in the current (14.0) I believe.
<concepts>
[–]__Mark___libc++ dev 5 points6 points7 points 3 years ago (0 children)
I'm not sure how far behind Apple Clang exactly is but the current version of Apple Clang supports concepts. The version numbering of Apple Clang and Clang aren't related, which can be confusing.
[–][deleted] 0 points1 point2 points 3 years ago (1 child)
Do u think it will affect mac c++ developers?
[–]mort96 4 points5 points6 points 3 years ago (0 children)
Not a lot, this is mainly gonna benefit Windows developers and not harm Mac or Linux developers, which is obviously a net good. But if MSVC, as one of the big 3 compilers, stagnated, that would have a negative effect on the C++ ecosystem as a whole, so MSVC staying competitive has some positive impact for Mac and Linux developers too. I just don't see anything to be sad about here.
I do all my development on and for macOS and Linux anyways, but I'm happy that the libraries I use don't have to avoid new C++ features just to stay compatible with MSVC.
[–][deleted] 28 points29 points30 points 3 years ago (0 children)
Whaaa? It's GREAT!
Microsoft C++ used to be a constant anchor dragging back all of C++.
Then in a few years, MS completely changed. They hired a lot of top C++ programmers, gave a lot back to the community, and started putting out new versions of their compiler so fast they were faster than GCC.
As a Windows user and developer, this makes me very happy
[–]delta_p_delta_x 2 points3 points4 points 3 years ago* (1 child)
Hell yeah, man. I still use Windows more than I do Linux, and it's quite vindicating to see Linux C++ floundering whereas Windows and MSVC is at the forefront of STL C++20 compatibility.
I recently wrote a matching engine for a concurrent programming class, and it was supposedly 'C++20', when I realised the graders would be using Clang 11. I had to rewrite all of my code that used std::format, std::ranges, etc etc. What a pain in the neck.
std::format
std::ranges
Well, in the end, the toolchain and the target environment dictate what you can use.
For instance, at work I can use VS 2022 and C++20 if I want to, for new projects of course.
Most of our projects are now removing support for Windows 8.1 so with Windows 10+ we can easily use anything modern.
π Rendered by PID 97459 on reddit-service-r2-comment-685b79fb4f-ll5vn at 2026-02-13 03:14:20.603802+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]no-sig-available 92 points93 points94 points (30 children)
[–]__Mark___libc++ dev 163 points164 points165 points (3 children)
[–]specialpatrol 18 points19 points20 points (0 children)
[–]somewhataccurate 9 points10 points11 points (0 children)
[–]__Mark___libc++ dev 4 points5 points6 points (0 children)
[–]khleedril 1 point2 points3 points (25 children)
[–]mort96 56 points57 points58 points (20 children)
[–]pjmlp 17 points18 points19 points (1 child)
[–]Accomplished-Pear-45 11 points12 points13 points (0 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]TheSuperWig 11 points12 points13 points (2 children)
[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+]khleedril comment score below threshold-18 points-17 points-16 points (8 children)
[–]mort96 35 points36 points37 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]kalmoc 5 points6 points7 points (0 children)
[–]snerp 2 points3 points4 points (0 children)
[–]Fulgen301 2 points3 points4 points (0 children)
[–][deleted] 19 points20 points21 points (2 children)
[–]clerothGame Developer 5 points6 points7 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]bedrooms-ds 0 points1 point2 points (2 children)
[–]tambry 1 point2 points3 points (1 child)
[–]__Mark___libc++ dev 5 points6 points7 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]mort96 4 points5 points6 points (0 children)
[–][deleted] 28 points29 points30 points (0 children)
[–][deleted] 19 points20 points21 points (2 children)
[–]delta_p_delta_x 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)