Title
Use of this in a brace-or-equal-initializer
Status
c++11
Section
11.9.3 [class.base.init]
Submitter
Daveed Vandevoorde

Created on 2009-03-12.00:00:00 last changed 130 months ago

Messages

Date: 2011-03-15.00:00:00

Proposed resolution (March, 2011):

This issue is resolved by the resolution of issues 1017 and 1207 in document N3282.

Date: 2017-02-06.00:00:00

References to non-static data members inside the body of a non-static member function (which includes the mem-initializers of a constructor definition) are implicitly transformed to member access expressions using (*this) (11.4.3 [class.mfct.non.static] paragraph 3) . Although _N4567_.5.1.1 [expr.prim.general] paragraph 3 permits use of this in a brace-or-equal-initializer for a non-static data member, 11.9.3 [class.base.init] does not give details about the value of this in that context, and there is no parallel to the transformation of member references into class member access expressions. This leaves use of non-static data members in this context underspecified.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3366
2011-04-10 00:00:00adminsetstatus: open -> fdis
2009-03-12 00:00:00admincreate