3 ms·
But adding the cast doesn't make type checking stricter, quite the opposite - it destroys any hope of the compiler checking the assignment. C++ shot itself in
by munch117 2y ago
But adding the cast doesn't make type checking stricter, quite the opposite - it destroys any hope of the compiler checking the assignment.
C++ shot itself in the foot by removing automatic conversion from void* to T*, because it forces programmers to add casts that weaken type safety.