Motivation: I'm trying to warn future maintainers that if they do something in the code they must make sure to do something else too
Please note that "instantiation" here means template instantiation and not object of class instantiation.
class A;
class B;
template<class T> void foo() {}
template<class T> class X {};
void f()
{
foo<A>();
}
void g()
{
X<A> x; // ok
X<B> y; // expecting static_assert here: if instantiated X with a type,
// foo must be instantiated with the same type too
}