http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51973
--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-01-24 08:57:09 UTC --- Another observation: Whether or whether not the problem occurs depends on the order of the two template declarations. Inverting the current order makes the program valid. My gut feeling here is that the revised test for templates equivalence based on CWG 1321 may result in an incorrect equivalence assumption between the two templates - just a guess.