I just read the wiki article about CRTP, and I\'m a little confused about template instantiation.
According to the wiki,
member function bodi
With class templates, the rule of thumb is that only those members are instantiated which are actually used.
If you want complete instantiation, C++ offers explicit instantiation (however, usually you don't; the fact that not every bit is fully instantiated means that your template class is even more generic as it lowers the requirements on T
, note that syntax checking and lookup of non-dependent types (stuff that is not dependent on T
) still happens).
You will find a more complete answer here: Template instantiation details of GCC and MS compilers