The placement of explicit specialization declarations for function
templates, class templates, member functions of class templates,
static data members of class templates, member classes of class
templates, member class templates of class templates, member function
templates of class templates, member functions of member templates of
class templates, member functions of member templates of non-template
classes, member function templates of member classes of class
templates, etc., and the placement of partial specialization
declarations of class templates, member class templates of
non-template classes, member class templates of class templates, etc.,
can affect whether a program is well-formed according to the relative
positioning of the explicit specialization declarations and their
points of instantiation in the translation unit as specified above and
below. When writing a specialization, be careful about its location;
or to make it compile will be such a trial as to kindle its
self-immolation.
Simply quoting section 14.7.3/7 of the 2011 International Standard for Programming Language C++
Yes... this is not a Joke