Does it? I'm interested in what the C++20 standard (N4860) says about it.
I am aware that gcc/clang/msvc all do not complain if I omit the inline keyword in such a situation, e.g. code like this
// header that is included in multiple .cpp files:
template <class T>
struct X{
void foo();
};
template <class T>
void X<T>::foo(){}
never gave me any compiler/linker errors (assuming foo is actually invoked from several TUs). But I fail to find a specific quote in the standard that says I am allowed to omit the inline keyword for the out-of-body definition of foo. Of course, if the struct above is not templated, then this is an odr violation (as per [11.4.1 p1] and [6.3 p10]). But for a template class, [13.7.1.1 p1] only says that I am allowed to place the definition out of body, without any mention to whether such function is considered inline.
basic.def.odr.6
Later it was changed to "all is odr-use except" basic.def.odr.14