There are some cases when we include .cpp file instead of standard header file (.h), for example:
#include \"example.cpp\"
instead of
There are legitimate uses for #include "impl.cpp"
:
testing for access to static/etc variables
ad hoc templates like these if c++ template mechanism proves inadequate (rare)
#define MACRO (...)
#include "impl.cpp" // uses MACRO
Note that #include "impl.cpp"
can be unsafe it same file is included in separate compilation units that are later linked together.