Suppose I have fileA.h
which declares a class classA
with template function SomeFunc
. This function is implemented directly
@[anthony-williams],
are you sure you're not confusing extern
template declarations with extern template
instantiations? From what I see, extern template
may only be used for explicit instantiation, not for specialization (which implies implicit instantiation). [temp.expl.spec] doesn't mention the extern
keyword:
explicit-specialization:
template
< > declaration