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
Let x be either the parameter of the constructor or, for the move constructor, an xvalue referring to the parameter. [...]
-[...]
otherwise, the base or member is direct-initialized with the corresponding base or member of x.
What is the value category of the corresponding base of x when overload resolution selected the corresponding constructor? In other words, consider the following simplified example
The selection between #1 and #2 requires the applying of [over.ics.rank#3.2.3]
S1 and S2 include reference bindings ([dcl.init.ref]) and neither refers to an implicit object parameter of a non-static member function declared without a ref-qualifier, and S1 binds an rvalue reference to an rvalue and S2 binds an lvalue reference
While [dcl.init.ref#5.3] says
In any case, the reference binds to the resulting glvalue (or to an appropriate base class subobject).
Regardless of #1 or #2, the references both bind to the base class subobject, which requires us to determine what the value category of an expression denoting that base class subobject is. This is underspecified in the current standard.
Although, the object of type A is denoted by a xvalue expression, however, that xvalue denotes object A rather than object B, as per [basic.lval#1.3].
The text was updated successfully, but these errors were encountered:
In [class.copy.ctor] p14
What is the value category of the corresponding base of x when overload resolution selected the corresponding constructor? In other words, consider the following simplified example
The selection between
#1
and#2
requires the applying of [over.ics.rank#3.2.3]While [dcl.init.ref#5.3] says
Regardless of
#1
or#2
, the references both bind to the base class subobject, which requires us to determine what the value category of an expression denoting that base class subobject is. This is underspecified in the current standard.Although, the object of type
A
is denoted by a xvalue expression, however, that xvalue denotes objectA
rather than objectB
, as per [basic.lval#1.3].The text was updated successfully, but these errors were encountered: