Are methods of templated classes implied inline
linkage (not talking about the inline optimization), or is it just templated methods which are?
Template functions and member functions of template classes are implicitly inline if they are implicitly instantiated, but beware template specializations are not.
template <typename T>
struct test {
void f();
}
template <typename T>
void test<T>::f() {} // inline
template <>
void test<int>::f() {} // not inline
By lack of a better quote:
A non-exported template must be defined in every translation unit in which it is implicitly instantiated (14.7.1), unless the corresponding specialization is explicitly instantiated (14.7.2) in some translation unit; no diagnostic is required