79818724

Date: 2025-11-13 10:19:16
Score: 1
Natty:
Report link

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.

Why 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.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Technostacks