- , inline.
?
++ 03 ยง7.1.3/4:
, inline. .
mainstream , , inline # 1 , , , inline.
.h .cpp ?
Yes, this is the usual compilation model used by most projects, in which you extract the interface (.h) from the implementation (.cpp). Interfaces are shared with users of your code in the form of header files, while the implementation is provided in the form of binary files. To some extent, this protects your intellectual property.
This is called the Separation Model .
C ++ projects that use templates typically use an Inclusion Model rather than a Separation Model for regular C ++ projects.
source
share