11 Classes [class]

11.4 Class members [class.mem]

11.4.13 Ambiguity resolution [class.mem.ambig]

An ambiguity can arise in a member-declaration when a type-name is enclosed in parentheses.
In this case, the choice is between the declaration of a function with an unnamed parameter and the declaration of a member with redundant parentheses around the declarator-id.
If the former interpretation would declare a function whose name is the injected-class-name of the enclosing class or class template and its decl-specifier-seq, if present, would contain neither friend nor a decl-specifier that is not permitted for a constructor ([class.ctor.general]), the former interpretation is chosen (i.e., the type-name is considered a simple-type-specifier rather than a declarator-id); otherwise, the latter interpretation is chosen.
As in [stmt.ambig], the disambiguation is purely syntactic and can result in an ill-formed interpretation.
[Example 1: typedef int t1, t2; template<class> struct u1; struct A { A(t1); // OK, declares constructor having unnamed parameter of type int, // not a data member named t1 typedef A(t2); // OK, declares t2 as an alias for A A(u1); // error: placeholder for deduced class type cannot appear in this context ([dcl.type.class.deduct]) }; — end example]