On Tuesday, 6 February 2018 at 23:32:49 UTC, Timothee Cour wrote:
but yes, API would look similar:

auto Cast(T)(T a) if(...) {}
auto Cast(string dsl)(T a) {}

Ah I see.
I think this is already partially done in Phobos (which shows the usefulness):

https://github.com/dlang/phobos/blob/master/std/experimental/typecons.d#L37

Reply via email to