On Thu, Aug 20, 2009 at 12:15 PM, div0<d...@users.sourceforge.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > John C wrote: >> div0 Wrote: >>> While we're on the subject, is it possible to mixin in a tuple? >>> Doesn't seem like you can... >>> >>> class C(M...) { >>> mixin M; >>> } >>> >>> Doesn't work. >> >> import std.typetuple; >> >> class C(M...) { >> >> mixin TypeTuple!(M); >> >> } > Unfortunately that doesn't work. > > It stops the immediate compile error, but the mixin doesn't > do anything:
This doesn't work either: class C(M) { mixin M; } template Foo() { void blarf() {} } auto x = new C!(Foo); x.blarf; because a parameter that is itself a template needs to be an alias template argument like so: class C(alias M) { ... } As far as I know you can't have an alias variadic argument or pass template aliases to a regular variadic template arg. --bb