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
The result of the call to the conversion function, as described for the non-reference copy-initialization, is then used to direct-initialize the reference.
This rule in introduced by CWG1571. The intent is that check the cv-qualification between the referenced type of the reference that is being initialized and the return type of the function call. However, a function call is either a glvalue or prvalue, the result of which is either an entity(i.e. an object or a function) or a value, which is not what we expect for checking whether discarding the cv-qualification. Moreover, the initializer expression used to initialize a reference is first to be an expression.
Another issue is that "the call to the conversion function" sounds like the selected function can only be the conversion function; a constructor is not a conversion function.
So, in order to clarify such two issues, [dcl.init.ref] p5.4.1 might be changed to
The call to the selected function, as described for the non-reference copy-initialization, is then used to direct-initialize the reference.
The text was updated successfully, but these errors were encountered:
[dcl.init.ref] p5.4.1 says
This rule in introduced by CWG1571. The intent is that check the cv-qualification between the referenced type of the reference that is being initialized and the return type of the function call. However, a function call is either a glvalue or prvalue, the result of which is either an entity(i.e. an object or a function) or a value, which is not what we expect for checking whether discarding the cv-qualification. Moreover, the initializer expression used to initialize a reference is first to be an expression.
Another issue is that "the call to the conversion function" sounds like the selected function can only be the conversion function; a constructor is not a conversion function.
So, in order to clarify such two issues, [dcl.init.ref] p5.4.1 might be changed to
The text was updated successfully, but these errors were encountered: