Topic: why doesn't STL gnu include auto_ptr?
Author: Matt Austern <austern@sgi.com>
Date: 1999/04/20 Raw View
Michele Paoli <zizzi@cribecu.sns.it> writes:
> I also ask if it is better to wait a new version of libstdc++ or change
> to an other STL library implementation, SGI o STLPORT.
>
> This is the portion of the libstdc++-2.8.1.1 file containing the
> auto_ptr code () commented:
> ........
> // Note: auto_ptr is commented out in this release because the
> details
> // of the interface are still being discussed by the C++
> standardization
> // committee. It will be included once the iterface is finalized.
>
> #if 0
> #if defined(_MUTABLE_IS_KEYWORD) && defined(_EXPLICIT_IS_KEYWORD) &&
> \
> defined(__STL_MEMBER_TEMPLATES)
>
> __STL_BEGIN_NAMESPACE
>
> template <class X> class auto_ptr {
> private:
> X* ptr;
> mutable bool owns;
That was from an earlier version of the SGI STL. We commented out
auto_ptr in that version for exactly the reason given in the comment:
at that time the details were still under discussion by the committee,
and we didn't want to provide an auto_ptr until we knew what the final
version would be.
That's just history, though. The C++ standard is now final, and the
auto_ptr design issues have been resolved. The current release of the
SGI STL (3.13) does include a standard-conforming auto_ptr.
---
[ 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 ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Michele Paoli <zizzi@cribecu.sns.it>
Date: 1999/04/20 Raw View
Hi, everybody
I have find that standard tamplate library implemented by gnu
(libstdc++-2.8.1.1) doesn't include the auto_ptr,
like other STL implementations do. For example SGI
(http://www.sgi.com/Technology/STL) or STLPORT
(http://www.stlport.org/).
I ask why gnu doesn't include auto_ptr.
I also ask if it is better to wait a new version of libstdc++ or change
to an other STL library implementation, SGI o STLPORT.
This is the portion of the libstdc++-2.8.1.1 file containing the
auto_ptr code () commented:
........
// Note: auto_ptr is commented out in this release because the
details
// of the interface are still being discussed by the C++
standardization
// committee. It will be included once the iterface is finalized.
#if 0
#if defined(_MUTABLE_IS_KEYWORD) && defined(_EXPLICIT_IS_KEYWORD) &&
\
defined(__STL_MEMBER_TEMPLATES)
__STL_BEGIN_NAMESPACE
template <class X> class auto_ptr {
private:
X* ptr;
mutable bool owns;
.........
Thanks.
---
[ 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 ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]