Is casting an object instance to a byte pointer the same as type punning?

280 views Asked by At

I've been talking about type punning with my roommate and we were disagreeing on whether or not taking an object and assigning it's reference to a byte pointer to treat it as a byte array in order to pass it to a system call, was the same as type punning or not? I had just learned about this term today and still wasn't exactly sure what it covered as I have probably done things that would be considered 'type punning' in the past but was unaware of the fact? I would just like some clarification on what is and isn't considered type-punning

0

There are 0 answers