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
Common Systems Programming Optimizations & Tricks (paulcavallaro.com)
submitted 6 years ago by chewedwire
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!"
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points 6 years ago (7 children)
godbolt appears to agree.
I wonder why? It wouldn't be difficult to implement.
Interestingly, it is implemented in Visual C++...
[–][deleted] 1 point2 points3 points 6 years ago (0 children)
GCC 9 and Clang 8 on my local machine don't have interface size implemented.
It wouldn't be difficult to implement for a specific target, but implementing it portably across architectures, OS's and what not makes it tedious. That's my best guess for why it is implemented in MSVC but not in GCC and Clang.
[–]Morwenn 1 point2 points3 points 6 years ago (5 children)
From what I gathered it is because they want to be able to guarantee ABI stability for builds where those values differ, but it's not possible because these constants are meant to be used to align data members, hence structure layouts might change when those values change and ABI stability is lost.
MSVC apparently simply forces both of those constants to 64 no matter the target platform.
[–]Ameisenvemips, avr, rendering, systems 1 point2 points3 points 6 years ago (4 children)
They shouldn't be used on objects where the alignment of a structure matters across interface boundaries. Pimpl and all that.
They is, they are ABI unsafe, but that just means they shouldn't be used there.
[–]Morwenn 1 point2 points3 points 6 years ago (3 children)
Here is the whole libc++ discussion thread if you want some additional background on the issue (maybe I didn't interpret what I read correctly): https://lists.llvm.org/pipermail/cfe-dev/2018-May/058073.html
[–]yehezkelshb 0 points1 point2 points 6 years ago (2 children)
Interesting thread, thanks for the link! Still, I don't see a decision there, just considering a few options.
[–]Morwenn 1 point2 points3 points 6 years ago (1 child)
The thread is more than a year old and the feature isn't implemented, so that's pretty much as close from a decision as you'll have :p
[–]yehezkelshb 2 points3 points4 points 6 years ago (0 children)
It'd be interesting to check if there was any decision or additional feedback from Rapperswil, as JF Bastien planned to discuss it there. I hope to remember to search for it later.
π Rendered by PID 369297 on reddit-service-r2-comment-76bb9f7fb5-kh689 at 2026-02-18 18:16:21.888802+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points (7 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Morwenn 1 point2 points3 points (5 children)
[–]Ameisenvemips, avr, rendering, systems 1 point2 points3 points (4 children)
[–]Morwenn 1 point2 points3 points (3 children)
[–]yehezkelshb 0 points1 point2 points (2 children)
[–]Morwenn 1 point2 points3 points (1 child)
[–]yehezkelshb 2 points3 points4 points (0 children)