mixin on identifier

David Nadlinger see at klickverbot.at
Mon Nov 21 15:39:33 PST 2011


Make T an alias parameter:
class StateSet(alias T) { … }

David


On 11/22/11 12:38 AM, Johannes Totz wrote:
>
> mixin template StateOne()
> {
>      int    value;
> }
>
> class StateSet(T)
> {
>      mixin T;
> }
>
> int main(string[] argv)
> {
>      StateSet!StateOne    s = new StateSet!StateOne();
>
>      return 0;
> }



More information about the Digitalmars-d-learn mailing list