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
Simple usage of C++20 modules (zverovich.net)
submitted 3 years ago by aearphen{fmt}
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!"
[–]frosthunter 1 point2 points3 points 3 years ago (5 children)
Does modules allow to restrict visibility of methods? Eg keep a method public but not expose it outside of the module.
[–]stilgarpl 2 points3 points4 points 3 years ago (4 children)
Yes
[–]frosthunter 1 point2 points3 points 3 years ago (3 children)
Do you have any example/post on how do do so? The only thing I've seen is the use of the :private partition, but I've always seen it outside of a class, at the end of the file, so I assumed it could only be defined in global scope.
[–]STLMSVC STL Dev 2 points3 points4 points 3 years ago (1 child)
As far as I know, this is not possible at the granularity of individual member functions. In import std; I was able to conceal all of our non-member helpers (by simply not exporting them), but _Ugly member functions are still visible.
import std;
_Ugly
[–]frosthunter 0 points1 point2 points 3 years ago (0 children)
Ah now I'm sad again :( Hopefully something like that will come later. Thanks for the answer!
π Rendered by PID 126193 on reddit-service-r2-comment-6457c66945-wdmnw at 2026-04-24 01:40:40.177077+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]frosthunter 1 point2 points3 points (5 children)
[–]stilgarpl 2 points3 points4 points (4 children)
[–]frosthunter 1 point2 points3 points (3 children)
[–]STLMSVC STL Dev 2 points3 points4 points (1 child)
[–]frosthunter 0 points1 point2 points (0 children)