As noted, it's a Clang bug. AClass
there is an injected-class-name, a unique grammatical construct which is both a class-name and a template-name.
Another workaround is to say AClass::template AClass
. This avoids needing to qualify AClass
with its enclosing namespace.