On Tue, Feb 24, 2009 at 11:39 PM, Tim M <[email protected]> wrote:
> On Wed, 25 Feb 2009 06:31:37 +1300, Justin <[email protected]> wrote:

> You are probably using alias and/or mixin incorrectly. It would be easier
> with full source but as a guess are you trying to do something like this:

What he's doing is right, ostensibly; template mixins have never
cooperated with overloading.

> module main;
>
>
> class TypeThing(T)
> {
>      T data;
>      this()
>      {
>            //
>      }
>      void SetValue(T data)
>      {
>            this.data = data;
>      }
> }
>
> class boolThing : TypeThing!(bool)
> {
>      this()
>      {
>            //
>      }
> }
>
> void Register(char[] t)()
> {
>      mixin("class "~t~"Thing : TypeThing!("~t~")
>            {
>                  this()
>                  {
>                        //
>                  }
>            }");
> }
>
> void main()
> {
>      Register!("bool");
>      Register!("char");
> }

I.. really am not sure what you're trying to do there?  But your idea
of using string mixins instead of template mixins might be useful
here.  If only we didn't have to resort to string mixins at every turn
:P

Reply via email to