[cfe-dev] Attributes on statements and expressions
Olaf Krzikalla
Olaf.Krzikalla at tu-dresden.de
Tue Apr 27 01:37:51 PDT 2010
Trevor Harmon schrieb:
> For those interested in reading about it, the best material I've been
> able to find so far is this:
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2418.pdf
>
> It's a little old but provides a good overview.
Another source of interest is
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3092.pdf esp.
section 7.6.
This is the FCD, so we can expect this getting standardized with some
minor changes only.
> There's one thing I'm confused about, though. I assume it's possible
> to define my own attributes, e.g. [[mycoolattr(42)]]. But how exactly
> do I do that? Is there some sample code somewhere?
I don't know of examples. The FCD states that the behavior of attributes
other than the predefined ones are implementation defined. That is you
can define your own attributes at will in the compiler implementation.
(hmm - that would prevent the standardization of other attributes in the
future. I'm going to raise that issue in csc++...)
Best regards
Olaf Krzikalla
More information about the cfe-dev
mailing list