restrict alias this?
Namespace
rswhite4 at googlemail.com
Sun Apr 29 01:14:09 PDT 2012
Based on my previous thread
(http://forum.dlang.org/thread/rpcqefmyqigftxsgsqui@forum.dlang.org),
I got the question whether it is possible to restrict "alias
this"?
Similar to templates function, e.g. "void foo(T)(T value) if
(isNumeric!(T) ...", but it should be limited here so that it
does not interact with the cast or something other.
As far as I know, "alias this" is an implicit cast. And just like
an explicit cast (opCast) it should be possible to restrict it.
Otherwise, I have unfortunately run out of ideas how I can allow
an implicit conversion.
More information about the Digitalmars-d-learn
mailing list