3 ms·
I always use the appropriate *_cast<> when converting pointers; Unsafe pointer casts are rare and it is good that they stand up. I do like the C cast syntax fo
by gpderetta 5y ago
I always use the appropriate *_cast<> when converting pointers; Unsafe pointer casts are rare and it is good that they stand up. I do like the C cast syntax for scalar casts though as they are often used to silence warnings for conversions that would happen anyway. I wish there was a variant of -Wold-style-cast just for pointer types.
- steerablesafe 5y ago> I wish there was a variant of -Wold-style-cast just for pointer types. And for reference types, pointer to members, pointer to/from integral and dependent types (which could become any of the above upon instantiation). But I do agree, with some concrete types it can be convenient.