What is the difference between the standard C++ library and STL?

How's that for a naive question?

I assume that the C++ standard library
comes with every reputable C++ compilere,
though they may differ in the details.
Is this also true for STL?

Ken
klopterAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DrBeakerConnect With a Mentor Commented:
Well, yes and no!

A version of the C++ Standard Template Library (STL) ships with every (modern)C++ compiler.  But, and this is a big but, the standard was only ratified late last year, and most compilers do not fully implement the standard yet.  Some are sadly lacking.

The STL went through a number of iterations indevelopemnt, and significant changes were being considered on the very last day that the standard was agred.  It's no wonder that it will take compiler writers time to catch up.

Many of the big-name C++ compilers have a way to go, though some, such as MS VC++, have library updates availabe to individual users (see http://www.dinkumware.com/).  The Borland C++ copiler (not CBuilder) is no longer being developed.

My money is on Metrowerks CodeWarrior which come with a very nearly standard STL (see http://www.metrowerks.com/).

Hope this helps


0
 
klopterAuthor Commented:
Oops, I spoke too soon.  http://www.dinkum.com/htm_stl/
gives the following definition:


STL is a proper subset of the Standard C++ library. Its thirteen
headers define templates that support the application of numerous  
algorithms
which perform useful actions, typically on sequences of objects. These can be conventional
C++ objects or elements of a sequence controlled by one of the STL template <b><a HREF="lib_cont.html#Containers">container</a></b> template classes.</p>

But still I wonder why two experts
responded to my question about the "c++
standard library" by pointing me to
CTL?

Is CTL, a more trusted subset of the
standard library?  A more useful
subset?  More portable?

Any hints greatly appreciated as always.

Ken
0
 
KangaRooCommented:
STL is the C++ standard library.
STL originated as a 'stand alone' library in 1994. It was adopted by the standards committee and incorporated in the standard as the C++ standard library.
There are differences, some implementations add functionality and some compilers don't support all C++ features required (member templates for instance) and implementations generally adapt to the compiler they are written for, or used on.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
klopterAuthor Commented:
I want to give the points to Dr. Beaker.

Ken
0
 
KangaRooCommented:
Why?
0
 
KangaRooCommented:
0
 
klopterAuthor Commented:
Kangaroo,
  I appreciate your help and if I haven't
given you any points I am sure that I
will at some point.  I just felt that DrBeaker's
answer was more complete.  The bizarre
aspect of this otherwise wonderful system
is that I, an amateur, have to judge between
expert responses.

Ken
P.S.  Thanks for the link
0
 
KangaRooCommented:
Off course and no offence taken or anything. It is more detailed and practical I suppose.
0
All Courses

From novice to tech pro — start learning today.