r/cpp • u/victor-s8n • 25d ago
How I design C++ classes
https://rafb.eu/blog/cpp-class-design/This is my first ever blog-post, any feedback is welcome! ofc, no AI got used.
66
Upvotes
r/cpp • u/victor-s8n • 25d ago
This is my first ever blog-post, any feedback is welcome! ofc, no AI got used.
View all comments
Show parent comment
2
u/LongestNamesPossible 21d ago
If you make a function that takes a string and returns a string, the regex can be included only in the compilation unit for that function.
It doesn't need to be in the header to use the function because it can be hidden in the implementation. Then the compilation time is isolated to a single compilation unit.