typedef: what's it good for?
BCS
none at anon.com
Wed Nov 11 10:01:48 PST 2009
Hello Simen,
> [...] suggest that
>
> typedef int foo;
>
> be kept as it is, and
>
> typedef int bar {
> /* stuffs */
> }
> be sugar for
>
> struct bar {
> int _payload;
> alias _payload this;
> /* stuffs */
> }
One important aspect of what I proposed is that operators that aren't overridden
still exist and use the same codegen as the base type (or are guarantied
to generate the same machine code in all cases).
More information about the Digitalmars-d
mailing list