🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3933

Re: some STL questions

#3933
From: Nathan Myers ncm
Date: Sat, 06 Apr 1996 05:34
43 lines
2655 bytes
Charles F. McDevitt wrote:
> Robert Krueger wrote:
> > can anyone tell me about the chances of STL becoming ANSI standard? 
> 
> The STL WILL be part of the C++ standard.  But the standard
> defines the interface to the STL and what functionality it
> should provide, but does not dictate a particular implementation.
> 
> Right now, there a dozens of STL implementations floating about.
> Most are matched to older drafts of the standard, some to the
> latest draft.  Some are just versions of the HP public domain
> implementation, some are commercial implementations for sale,
> and some are updated versions to work around deficiencies in
> particular compilers.

Just to make sure no one misses the point:

It is meaningless to say "The" STL.  There are lots of them and they
are not entirely compatible with one another or with the Draft standard.

The commercial implementations tend to be mostly upward/backward/leftward
compatible with what's in the Draft, but not completely.  Probably both the
biggest and most common incompatibility is in the definition of stack<>,
queue<>, and priority_queue<>:

  HP STL:  template <class Container> class stack;
  Draft:   template <class Element, class Container=deque<Element>...>
           class stack;

An upward-compatible implementation (for "obsolete" compilers) would say:

  XYZInc:  template <class Element> class stack;   // use deque<Element>

but I don't know which commercial STL releases do this yet (if any).

Nathan Myers
ncm@cantrip.org
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <316597B9.40DE4194@cantrip.org>
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
References: <4k0mcd$179b@rs18.hrz.th-darmstadt.de> <31655027.3CFF@compuserve.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
From: "Nathan Myers <ncm@cantrip.org>" <ncm@cantrip.org>
Newsgroups: comp.std.c++
Subject: Re: some STL questions
Date: 06 Apr 96 05:34:24 GMT
Organization: Best Internet Communications
Approved: fjh@cs.mu.oz.au
Message-ID: <316597B9.40DE4194@cantrip.org>
References: <4k0mcd$179b@rs18.hrz.th-darmstadt.de> <31655027.3CFF@compuserve.com>
NNTP-Posting-Host: mundook.cs.mu.oz.au
X-Original-Date: Fri, 05 Apr 1996 13:59:21 -0800
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMWYCd+EDnX0m9pzZAQFlGAF+OEDSU2Tr4bgv37KOMwgq7YEXe5/oIRuL
 iTRUsKSuBX4SoD+kl/t0ShIAy2zq7Fug
 =GfWc
Originator: fjh@mundook.cs.mu.OZ.AU