I am specifically asking about file structure and where to put what. Consider the following (this is an example of my current structure):
foo.h consists of:
template <typaname T>
class Foo {
void bar();
}
#include "foo-inl.h"
foo-inl.h consists of:
template<typaneme T>
void Foo::bar() {
}
Some baz.cpp has:
#include "foo.h"
Foo<X> foo;
and some other nom_test.cpp has:
#include "foo.h"
Foo<TestY> foo;
How do I restructure this to take advantage of the explicit instantiation in both the prod code (baz.cpp) and test code (nom_test.cpp). Mind, I wouldn't like to expose the test types to the prod build.