|
|
|
|
|
by janoc
3360 days ago
|
|
Good luck chasing bugs then, though. qsort() will be totally happy comparing apples to oranges - aka there is zero type safety. Templates give you compile time type checking, that's why one doesn't pass void pointers like this anymore but uses templates to implement generic functions. |
|
That's a fair point. However, I do not tend to make many of the mistakes that would be caught by the C++ type system. But different people tend to make different kinds of mistakes.
The type bugs that happen tend to be pretty obvious and easy to debug. Good luck to you debugging template code :) I've had a harder time debugging C++ code than C code. Again, YMMV.