cast overly permissive with extern(C++ ) classes; should cast through `void*`
Timothee Cour
thelastmammoth at gmail.com
Tue Feb 6 20:39:09 UTC 2018
should we force force casting through `void*` for extern(C++) classes ?
i.e. `cast(Derived) cast(void*) base_instance;`
currently, `cast(A) unrelad_cpp_instance` happily compiles but
shouldn't, it's very error prone even though the cast syntax suggests
type safety; especially a problem if we make a class become
extern(C++) in the future
[came up after discussing with jacob-carlborg]
More information about the Digitalmars-d
mailing list