r/cpp • u/According_Leopard_80 • Apr 09 '26
Writing only decoupled code
https://middleraster.github.io/DAG/HeaderOnlyNoForwardDeclarations.html
12
Upvotes
r/cpp • u/According_Leopard_80 • Apr 09 '26
View all comments
5
u/Big_Target_1405 Apr 10 '26
Putting all your code in headers is the opposite of creating decoupled code.
Every time one header changes loads of your code needs to be recompiled. All of that code is coupled.