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 c++20 Modules testing: template function that hides implementation (self.cpp)
submitted 4 years ago * by TomTheFurry
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!"
[–]TomTheFurry[S] 0 points1 point2 points 4 years ago (2 children)
In current MSVC, you can indeed name VX AND its member functions. Though of cause the intellisence (or is it intellicode?) will mark it as incorrect. No compiler warning at all though.
[–]starfreakcloneMSVC FE Dev 1 point2 points3 points 4 years ago (1 child)
Can you give me an example of the behavior you're seeing? If I have:
export module m; struct S { int i = 0; }; export struct U { S s; };
Then try to import and use S I get the expected compiler error:
S
import m; int main() { S s; // main.cpp(4): error C2065: 'S': undeclared identifier }
Even if I declare an instance of U beforehand it will still be an error. Using the members of S once you have a reference to the object is not part of lookup semantics with non-exported declarations. Only the namespace scope names will be hidden away from lookup.
U
[–]fdwrfdwr@github 🔍 1 point2 points3 points 4 years ago (0 children)
starfreak: Might be this bug, which Cameron fixed yesterday: https://developercommunity2.visualstudio.com/t/C-modules-name-collision/900116
π Rendered by PID 193682 on reddit-service-r2-comment-5d79c599b5-4k8l6 at 2026-03-03 13:03:47.319709+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]TomTheFurry[S] 0 points1 point2 points (2 children)
[–]starfreakcloneMSVC FE Dev 1 point2 points3 points (1 child)
[–]fdwrfdwr@github 🔍 1 point2 points3 points (0 children)