(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
No, not really. And yes, kind of.
There are varying definitions of "the STL", including:
The actual HP/SGI STL, the original library, parts of which the C++ Standard Library was based on. They included containers, iterators and algorithms. Strings were not a part of this.
The parts of the C++ Standard Library that were based on the SGI STL library: containers, iterators and algorithms. Still no strings.
All of the C++ Standard Library. This definition has absolutely no grounding in logic or reality though, if followed, std::string
would be included.
Note that the actual STL has developed since C++ was standardised (some 13 years ago, remember), and they've backwards-adopted some of the stuff that went into the standard, like strings. This does not mean that they were originally there in 1998... but they are there now for "compatibility" reasons.
Summary
The STL was containers, algorithms and iterators.
Strings and streams were adopted for C++98, then backwards-adopted for the modern SGI STL.
Whether strings are "part of the STL" or not depends on whether you follow logic and reason, or call the standard library "STL".
Hope this helps.
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.
It is part of STL indeed. And std::string is just basic_string typedef. It is container, specialized ( not in c++ "specialization" meaning :) ) for data storage with string semantics. No idea about Stepanov though. Worth mentioning is that STL is "Standard Template Library", not only container subpart. That includes algorithms, streams and some traits.