Topic: some STL questions


Author: Nico Josuttis <nico@bredex.de>
Date: 1996/04/11
Raw View
In article <4k0mcd$179b@rs18.hrz.th-darmstadt.de>,
Robert Krueger <krueger@luegfix.bauwesen.th-darmstadt.de> wrote:
>Hi,
>can anyone tell me about the chances of STL becoming ANSI standard? I heard
>it was accepted in the draft but what does that actually mean? There seem to
>be a few different implementations out there. Which one is advisable for
>the Solaris C++-Compiler? Anyone using STL on Solaris?
>It seems to run fine with gnu gcc 2.7.2 using the latest libg++ (which
>includes the gnu STL implementation if I'm not terribly wrong) but I
>can't get it to work with Solaris CC.
>
>Any help (or just comments) appreciated by an STL Newbie,
>
> Robert
>

For those who live in Germany:
In about two month my new book "Die C++-Standard-Bibliothek"
will arrive published by Addison Wesley Germany.
It covers in about the half of the book about the STL from the point of view
of the integration into the standard library.
There are no conceptional but some relevant minor changes.

--
Nico                             address: BREDEX GmbH, Nicolai Josuttis
email:   nico@bredex.de                   Fallersleber-Tor-Wall 23
phone:   +49 531 24330-0                  D-38100 Braunschweig
fax:     +49 531 24330-99                 Germany


[ 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                             ]





Author: "Nathan Myers <ncm@cantrip.org>" <ncm@cantrip.org>
Date: 1996/04/06
Raw View
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                             ]





Author: john@cooper.terranet.com (John R. Cooper)
Date: 1996/04/06
Raw View
In article <31655027.3CFF@compuserve.com>, "Charles F. McDevitt"
<70302.2374@compuserve.com> wrote:

>Right now, there a dozens of STL implementations floating about.
>Most are matched to older drafts of the standard, some to the
>latest draft.

   I have yet to find an implementation (particularly of the whole C++
library, not just the STL portion of it) conforming to the latest draft
anywhere on the net. Is there a free version on a website or ftpsite
somewhere?

-John

+--------------------------+------------------------------------------+
| John R. Cooper           | Internet: john@cooper.terranet.com       |
| Vivid Technologies, Inc. |           jc@vivitech.com                |
| Waltham, MA 02154        |           jcooper@world.std.com          |
+--------------------------+------------------------------------------+
|                          | GCS/O d H s g+ p? au>+ a- w v++ C++$ U-- |
| "Rub her feet."          | P- L- 3- E N+ K++ W++ M++ V -po+ Y+ t++@ |
|        - Long's Notes    | 5+++ j R+++$ G' tv@ b+ D+ B--- e++ u**  |
|                          | h--- f+ r++ n->+ y+++*>$                |
+---------------------------------------------------------------------+
---
[ 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                             ]





Author: David Byrden <Goyra@iol.ie>
Date: 1996/04/06
Raw View
krueger@luegfix.bauwesen.th-darmstadt.de (Robert Krueger) wrote:

>Hi,
>can anyone tell me about the chances of STL becoming ANSI standard?

      It will.


>I heard
>it was accepted in the draft but what does that actually mean?

      That it will.


>There seem to
>be a few different implementations out there.

      Only the STL's interface will be defined by the Standard, and an
interface specification may be met by any number of implementations, so
that is not unusual.

      However, at this stage there is no existing compiler that can meet
even the draft STL interface statndard, because it uses advanced C++
features. Therefore, the available implementations all provide some subset
of the correct interface.

                                      David
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: vandevod@cs.rpi.edu (David Vandevoorde)
Date: 1996/04/06
Raw View
>>>>> "JRC" == John R Cooper <john@cooper.terranet.com> writes:
[...]
JRC>    I have yet to find an implementation (particularly of the
JRC> whole C++ library, not just the STL portion of it) conforming to
JRC> the latest draft anywhere on the net. Is there a free version on
JRC> a website or ftpsite somewhere?

Given that the draft-standard library now relies on partial
specialization and member function templates, and that no publicly
available compiler seems to support this sort of thing, I doubt such
an implementation would be of much use right now (or would be very
reliable).

 Daveed
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: David Byrden <Goyra@iol.ie>
Date: 1996/04/07
Raw View
john@cooper.terranet.com (John R. Cooper) wrote:
>
>   I have yet to find an implementation (particularly of the whole C++
>library, not just the STL portion of it) conforming to the latest draft
>anywhere on the net. Is there a free version on a website or ftpsite
>somewhere?

        There are no versions conforming to the latest (Jan 96) draft,
because there are no compilers with template member functions (he said,
tongue in cheek).


                                   David
---
[ 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                             ]





Author: vandevod@cs.rpi.edu (David Vandevoorde)
Date: 1996/04/08
Raw View
>>>>> "DB" == David Byrden <Goyra@iol.ie> writes:
[...]
DB>         There are no versions conforming to the latest (Jan 96)
DB> draft, because there are no compilers with template member
DB> functions (he said, tongue in cheek).

There is one apparently: John Spicer's pre-alpha compiler (if I remember
Nathan Myers' wording :) that compiles Greg Colvin's new auto_ptr
implementation. However, that compiler is not available to the public yet.

OTOH, the library now also requires support for partial specialization...

 David Vandevoorde
---
[ 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                             ]





Author: jbuck@Synopsys.COM (Joe Buck)
Date: 1996/04/08
Raw View
john@cooper.terranet.com (John R. Cooper) writes:
>   I have yet to find an implementation (particularly of the whole C++
>library, not just the STL portion of it) conforming to the latest draft
>anywhere on the net. Is there a free version on a website or ftpsite
>somewhere?

If someone gave you such an implementation, what would you do with it?
Your compiler would not be able to compile it, as many features are
specified that aren't supportable by current compilers.

But there simply aren't huge numbers of people putting out free C++ system
libraries.  Other than the HP STL release and the FSF/Cygnus releases of
C++ libraries for GNU C++, together with a few small bits here and there,
what you're asking for is not available.  This kind of development costs
money, either from customers (e.g. you pay for it), support contracts and
donations, or research funding (for the freely available parts).


--
-- Joe Buck  <jbuck@synopsys.com> (not speaking for Synopsys, Inc)

Work for something because it is good,
not just because it stands a chance to succeed.    -- Vaclav Havel
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: krueger@luegfix.bauwesen.th-darmstadt.de (Robert Krueger)
Date: 1996/04/05
Raw View
Hi,
can anyone tell me about the chances of STL becoming ANSI standard? I heard
it was accepted in the draft but what does that actually mean? There seem to
be a few different implementations out there. Which one is advisable for
the Solaris C++-Compiler? Anyone using STL on Solaris?
It seems to run fine with gnu gcc 2.7.2 using the latest libg++ (which
includes the gnu STL implementation if I'm not terribly wrong) but I
can't get it to work with Solaris CC.

Any help (or just comments) appreciated by an STL Newbie,

 Robert

---

Robert Krueger
Institut fuer Numerische Methoden und Informatik im Bauwesen
Petersenstr. 13
64287 Darmstadt
Germany

Tel. ++49 6151 16 6677
---
[ 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                             ]





Author: "Charles F. McDevitt" <70302.2374@compuserve.com>
Date: 1996/04/05
Raw View
Robert Krueger wrote:
>
> Hi,
> can anyone tell me about the chances of STL becoming ANSI standard? I heard
> it was accepted in the draft but what does that actually mean? There seem to
> be a few different implementations out there. Which one is advisable for
> the Solaris C++-Compiler? Anyone using STL on Solaris?
> It seems to run fine with gnu gcc 2.7.2 using the latest libg++ (which
> includes the gnu STL implementation if I'm not terribly wrong) but I
> can't get it to work with Solaris CC.
>
> Any help (or just comments) appreciated by an STL Newbie,
>
>         Robert

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.
---
[ 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                             ]