Shouldn't casting an object to void* be considered @safe?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Dec 16 11:02:59 UTC 2019


On Monday, 16 December 2019 at 01:01:26 UTC, Andrej Mitrovic 
wrote:
> On Saturday, 14 December 2019 at 17:25:25 UTC, Joseph Rushton 
> Wakeling wrote:
>> Surely where code has a cast to `void*` and then later back to 
>> some other pointer type
>
> The question was only about the first part, casting to void*, 
> not casting back.

Yea, I get that.  My point is that I'm not sure that it makes 
sense to decouple the first part and the second part, when 
thinking about safety, and the programmer's responsibility to 
manually verify it.


More information about the Digitalmars-d mailing list