Title
odr-use of this from a local class
Status
nad
Section
11.6 [class.local]
Submitter
David Krauss

Created on 2013-07-10.00:00:00 last changed 124 months ago

Messages

Date: 2014-01-15.00:00:00

Rationale (January, 2014):

The restrictions in _N4567_.5.1.1 [expr.prim.general] limiting the locations in which this may appear already prevent uses of the containing member function's this where the local class's this does not hide it.

Date: 2022-11-20.07:54:16

According to 11.6 [class.local] paragraph 1,

Declarations in a local class shall not odr-use (6.3 [basic.def.odr]) a variable with automatic storage duration from an enclosing scope.

This restriction should apply as well to the this pointer when the class is local to a non-static member function.

History
Date User Action Args
2014-01-20 00:00:00adminsetmessages: + msg4794
2014-01-20 00:00:00adminsetstatus: drafting -> nad
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-07-10 00:00:00admincreate