Source code annotations alla Java

Simen kjaeraas simen.kjaras at gmail.com
Thu Jan 20 11:28:34 PST 2011


Trass3r <un at known.com> wrote:

>> class Foo
>> {
>>      int x;
>>      int y;
>>      int z;
>>
>>      mixin NonSerialized!(z);
>> }
>
> Had a quick look at  
> http://dsource.org/projects/orange/browser/orange/serialization/Serializable.d
> 1. How come it works without 'mixin' in the template declaration (mixin  
> template NonSerialized)?

Templates are not currently required to be marked as mixin templates in  
order to
be used as such. However, a mixin template can only be instantiated as a  
mixin.

-- 
Simen


More information about the Digitalmars-d-learn mailing list