[cfe-commits] [PATCH] C++0x: Allow static member access to non-static fields in a sizeof() expression.

Sebastian Redl sebastian.redl at getdesigned.at
Sat Nov 20 13:33:41 PST 2010


On 20.11.2010, at 22:14, Jakub Wieczorek wrote:

> Hi,
> 
> I'm attaching a patch that makes it possible to access non-static data
> members in a static context in unevaluated expressions (such as
> sizeof), e.g.:
> 
> struct a { int b; };
> char c[sizeof(a::b)];
> 
> This isn't permitted in C++03 but the rule has been relaxed in C++0x [1].

Looks good. Do you have commit access?

Sebastian



More information about the cfe-commits mailing list