r/cpp • u/holyblackcat • Mar 09 '26
The compilation procedure for C++20 modules
https://holyblackcat.github.io/blog/2026/03/09/compiling-modules.html
102
Upvotes
r/cpp • u/holyblackcat • Mar 09 '26
View all comments
Show parent comment
2
u/sudgy Mar 09 '26
Try declaring a class in the cppm file and then defining a member function in the cpp. It doesn't work. This is just like how you can provide the declaration for a free function without including the header and it still links.