Re: c++ stl
On Feb 19, 12:17 am, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
On Fri, 2011-02-18, James Kanze wrote:
On Feb 18, 9:52 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
Pete Becker wrote:
MiB is correct, but note that many people use "STL" to refer
to the C++ STandard Library.
The C++ standard library encompasses a bit more components
than the STL[1]. If "many people" refer to the C++'s standard
library as "STL" then "many people" are making a mistake.
The C++ standard library is largely a "template" library.
I think of it as three parts: the C library (which is a quite large
part!), the parts from (or compatible with) the original STL
(containers, iterators and algorithms), and some other stuff
(iostreams, locales, possibly std::string ...).
Personally, when I say STL (which is rarely) I mean the second part.
You'd never hear me claim std::printf is part of the STL.
Good point. The T in STL means template, so STL really
shouldn't refer to anything that isn't a template. For most
people I talk to, STL doesn't include the C library, and it
doesn't include some of the language support either (e.g. the
operator new functions, or the standard exceptions). And for
almost everyone, it does include the parts of Stepanov's library
which were included in the standard. Where the meaning varies
is whether additional templates in the standard library (e.g.
std::basic_string, or the iostreams or the locale stuff) is part
of STL or not, and for some people, whether parts of Stepanov's
library that didn't make it into the standard (like slist), or
templates which have since been added to Stepanov's library
(like rope or hash_map) are part of the STL. Usage varies, so
if you want to be precise, it's best to avoid the term.
--
James Kanze