2 ms·
Are you saying a C++ developer shouldn't use the standard library?
by kcb 6y ago
Are you saying a C++ developer shouldn't use the standard library?
- Tuna-Fish 6y agoNot the person you are replying to, but "a lot of the standard library is horrifying and should never be touched" is pretty standard advice for C++. Mind, I don't think this particular function belongs to that set.
- klyrs 6y agoMany performance-critical C++ programmers treat std with suspicion. One thing to keep in mind is that the interface is standard, but the implementations are not, and can foil you on cross-platform development. Another is that you might not need everything that a std container provides, and you can get away with a streamlined data structure that doesn't support those unnecessary operations. But as a sibling commenter notes... this isn't relevant for min/max.
- kcb 6y agoI'd much rather work on an application that utilized the standard lib than one that brought in dependencies and custom data structures. If it really is a bottleneck on a hot path then go for it. But not using it because of some ancient anecdotes is going to lead to an unmaintainable mess.