cast overly permissive with extern(C++ ) classes; should cast through `void*`

Seb seb at wilzba.ch
Wed Feb 7 01:13:56 UTC 2018


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


More information about the Digitalmars-d mailing list