I have been asked for creating this answer. See paragraph [temp.mem.enum] 14.5.1.4/1 of the C++ standard:
An enumeration member of a class template may be defined outside the class template definition. [ Example:
template<class T> struct A { enum E : T; }; A<int> a; template<class T> enum A<T>::E : T { e1, e2 }; A<int>::E e = A<int>::e1;
—end example ]
Newer version of clang (3.4) compiles your code successfully with flag -pedantic-errors
whereas gcc 4.8.1 still considers it is an error. I think it is a gcc bug.