The short answer is: Clang and GCC are correct. You must use typename A::B
The compilers that accept A::B() or A::B{} without typename are non-compliant in this case.
typename is Required Here?The rule is that you must use the typename keyword to prefix any dependent qualified name that refers to a type.
The entire issue boils down to one question: Is A::B a dependent name? The answer is yes.