TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25190 24
that such dependencies will need private access to each other anyway.

If you want hierarchy (and encapsulation), use dots in the module name like so: 'mylib.class.dep1', 'mylib.class.dep2'. This declares two modules (that will actually be compiled separately). Without exposing private members (with this proposal).

So, TL;DR: Modules could make PIMPL redundant by:

* allowing users to skip importing depended modules if no functions or classes from that module are actually exposed or exported by the parent

* allowing module implementation units to access private members of classes defined within that module

https://redd.it/1tcsv0c
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 3, 2026Lets explore the stack https://meetingcpp.com/blog/items/Lets-explore-the-stack.html https…
  2. Oct 3, 2026C++ Show and Tell - October 2026 Use this thread to share anything you've written in C++.…
  3. Oct 3, 2026C++ future at Adobe So if anyone was still curious what happened to Hylo, or where Adobe s…
  4. Oct 3, 2026C++ Jobs - Q4 2026 Rules For Individuals --------------------- * **Don't** create top-leve…
  5. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  6. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →