Based on my previous thread (http://forum.dlang.org/thread/rpcqefmyqigftxsgs...@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.

Reply via email to