|
|
|
|
|
by spacechild1
24 days ago
|
|
> but then most C++ seems to use a C-style cast If C++ programmers do not use modern safety features, that's really their fault. C-style pointer casts should be flagged in code review. > but that it becomes even less safe by adding a C-style cast. At least in C++ there is a safer option. If you really want to be on the safe side, you can even to a dynamic_cast (assuming your code base allows RTTI). > It is also not clear what is gained by forcing programmers to add a cast. I think the point is to make it explicit and stand out. |
|