Using a specialization which is not visible at the POC - point of call - is an error.
By the way compilers are not required to treat this as an error and can handle it as they like.
You should have the specialization into the header file but in C++11 you can do it into an external unit with the C++11 "extern" keyword for explicit instantiation declaration
As noted by Sebastian: it's a violation of the requirement in 14.7.3/6
:
"If a template [...] is explicitly specialized then that specialization shall be declared before the first use of that specialization that would cause an implicit instantiation to take place, in every translation unit in which such a use occurs; no diagnostic is required."
Since no diagnostic is required, violating this requirement is undefined behavior.