You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [namespace.udecl], inside a note, it is written:
A constructor of a derived class is sometimes preferred to a constructor of a base class if they would otherwise be ambiguous ([over.match.best]).
Which suggests that the derived constructor is selected as part of the selection of the best viable function. But I have found nothing in [over.match.best] related to inherited constructor.
The only rule I found is in [over.match.func]/8:
A constructor inherited from class type C ([class.inhctor.init]) that has a first parameter of type “reference to cv1 P” (including such a constructor instantiated from a template) is excluded from the set of candidate functions when constructing an object of type cv2 D if the argument list has exactly one argument and C is reference-related to P and P is reference-related to D.
So I think that in [namespace.udecl] the should be closer to:
An inherited constructor with a single argument, depending on this argument type, may not participate to overload resolution ([over.match.func]).
The text was updated successfully, but these errors were encountered:
a viable function F1 is defined to be a better function than another viable function F2 if [...] F1 is a constructor for a class D, F2 is a constructor for a base class B of D, and for all arguments the corresponding parameters of F1 and F2 have the same type
In [namespace.udecl], inside a note, it is written:
Which suggests that the derived constructor is selected as part of the selection of the best viable function. But I have found nothing in [over.match.best] related to inherited constructor.
The only rule I found is in [over.match.func]/8:
So I think that in [namespace.udecl] the should be closer to:
The text was updated successfully, but these errors were encountered: