C++ Frontend Tales

All | Boost | General | Loki
« To google public... | Main | One more language... »

20061031 Tuesday October 31, 2006

typeof and alignof

Now Sun Studio C++ accepts g++ extension - operator __typeof__ (as well as __typeof and typeof). Keyword typeof is available under -features=gcc command line option. So you can write:

int * x;
__typeof__(*x) n;

Operator __alignof__ now accepts expression:

unsigned v = 0;
unsigned a = __alignof__(v);

Permalink Comments [0]
Trackback URL: http://blogs.sun.com/sga/entry/typeof_and_alignof
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed