The code:
#include <iostream>
template<int N>
struct A
{
int a = A<1>::a;
};
int main() { }
Is invalid for CLANG, but valid for GCC. What behavior is actually correct? The Standard wasn't pretty clear about that:
N4296::14.7.1/1 [temp.inst]
Unless a class template specialization has been explicitly instantiated (14.7.2) or explicitly specialized (14.7.3), the class template specialization is implicitly instantiated when the specialization is referenced in a context that requires a completely-defined object type or when the completeness of the class type affects the semantics of the program.