Consider this code:
template <typename T>
class A {
T x;
// A bunch of functions
};
std::size_t s = sizeof(A<double>);
Assume the sizeof
operator is the only place where an instantiation of A<double>
is required. Is it possible that the compiled program does not contain relevant code for A<double>
(e.g. A<double>::~A()
)?