Title
Indirect base classes for class member access with direct base class relationship
Status
ready
Section
7.6.1.5 [expr.ref]
Submitter
CWG

Created on 2025-11-03.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-07.19:28:52

Proposed resolution (approved by CWG 2025-11-07):

Change in 7.6.1.5 [expr.ref] bullet 8.6 as follows:

  • Otherwise, if E2 designates a direct base class relationship (D, B) and D is either the cv-unqualified class type of E1 is cv T or a base class thereof, let cv be the cv-qualification of the type of E1. E1 is implicitly converted to the type "reference to cv D" (where the reference is an lvalue reference if E1 is an lvalue and an rvalue reference otherwise) and the expression designates the direct base class subobject of type B of the object designated by the converted E1. If E1 is an lvalue, then E1.E2 is an lvalue; otherwise, E1.E2 is an xvalue. The type of E1.E2 is “cv B” cv B. [Note 6: This can only occur in an expression of the form e1.[:e2:]. —end note]
Date: 2025-11-05.08:57:10

Subclause 7.6.1.5 [expr.ref] bullet 8.6 does not specify what happens if the direct base class relationship originates from an unambiguous base class of E1.

History
Date User Action Args
2025-11-07 19:18:15adminsetstatus: tentatively ready -> ready
2025-11-05 08:57:10adminsetmessages: + msg8210
2025-11-05 08:57:10adminsetstatus: open -> tentatively ready
2025-11-03 00:00:00admincreate