3 ms·
The problem with templates in C++ is that they are just that. The compiler will hapily generate broken code if you use a map with a type that doesn't implement
by imtringued 9y ago
The problem with templates in C++ is that they are just that. The compiler will hapily generate broken code if you use a map with a type that doesn't implement comparison operators and then spew out hundreds of lines of compiler errors at a location that is another hundred lines deep in library code away from the line of code that caused the error in your application. Something as trivial as type constraints for type parameters like you see in virtually any programming language with generics is the solution.
I don't feel that C++ is complex at all. It just has more crap and every programming language has crappy parts.