Is std::string part of the STL?

后端 未结 3 1745
执笔经年
执笔经年 2020-12-13 09:03

(When I say STL, I\'m talking about the template library that revolves around containers, iterators, algorithms and functors.)
This question came to mind afte

3条回答
  •  伪装坚强ぢ
    2020-12-13 09:57

    There is no real answer to this. On one hand, std::string was developed entirely independently from the other containers. On the other hand, it's had enough added on to meet all the requirements of a random-access container. Whether you choose to classify that as part of "STL" or not is entirely up to you -- in the end, it just points to the fact that "STL" lacks a single, agreed-upon definition, and the chances of it suddenly gaining a clear meaning is remote (to put it nicely).

    IOW, "STL" is a lousy abbreviation to use because people use it to mean at least three different things -- but, unfortunately, there's no better abbreviation around with a better defined meaning either, so STL remains in use and will probably continue to do so (and continue to obstruct communication) indefinitely.

提交回复
热议问题