#included)? That is to say, should the definition of a template class/function result in its own .o file?
#include, resulting in 'incomplete type' errors when using this pattern.)
#included in its own .h file (e.g. 'ClassName_impl.h'), and that .h file
#included in translation units where the definition is needed?
#include:
class Derived: public Base<Type> {...};
#include "A.h"(because it needs to access members of A). A.h must
#include "C.h"because A is composed of C. Because A.h was included before C was defined, the compiler does not recognize it, and
#pragma onceprevents the preprocessor from including C.h again before the definition of A. Removing
#pragma oncewould allow A to be completely defined, but a redefinition would happen once the include tree returns from C.h:2 and the rest of C.h is compiled.
#includedefinition files from header files, only from .cpp files where they are needed.