Type wrapping blockers

Simen kjaeraas simen.kjaras at gmail.com
Tue Oct 5 09:08:19 PDT 2010


Steven Schveighoffer <schveiguy at yahoo.com> wrote:

> But if you *wrap* the type that contains foo, you cannot use opDispatch  
> to implement foo(1), because IFTI treats 1 as an int.  So what you get  
> is an instantiation of opDispatch like this:
>
> opDispatch!("foo", int)(1)  Which then cannot call foo, because you  
> cannot cast int to short.
>
> Does anyone have any other blockers that prevent type wrapping?  Does  
> anyone have any ideas on how to fix the above issue?

Not directly. However, you could probably coerce std.typecons'
AutoImplement to do your wrapping for you.


-- 
Simen


More information about the Digitalmars-d mailing list