CRTP in D?
Saaa
empty at needmail.com
Wed Aug 19 15:17:01 PDT 2009
"Bill Baxter" <wbaxter at gmail.com> wrote in message
news:mailman.344.1250719235.14071.digitalmars-d-learn at puremagic.com...
On Wed, Aug 19, 2009 at 2:59 PM, Saaa<empty at needmail.com> wrote:
>
>> Mixins can be used to do a lot (most? all?) of things CRTP is used for:
>>
>> class Class(alias MixMe)
>> {
>> mixin MixMe impl;
>> ...
>> void doSomething {
>> impl.doIt();
>> }
>> }
>>
>
> where can I read about class parameters?
It's just a class template. Short for
template Class(alias MixMe) {
class Class {
....
}
}
See http://www.digitalmars.com/d/2.0/template.html under "Class Templates".
--bb
Thanks ;)
More information about the Digitalmars-d-learn
mailing list