Consider the following header file:
// Foo.h
class Foo {
public:
template
void read(T& value);
};
I
I've had the same requirement not long ago, and had good results with a simple function template instantiation:
template
void forceInstantiation(typedef boost::mpl::vector*) {
using ex = int[];
(void)ex{(void(&Foo::read), 0)..., 0};
// C++17
// (void)((void(&Foo::read), ...));
}
template void forceInstantiation(types*);