Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 17416, auto_ptr does not work with containers

by Alexei Nikitin Email: Anonymous

Impossible to compile:
vector< auto_ptr< int > > v( 5 );
Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For C++Builder, Version 5.0  to 5.0 9 downloads
Copyright: No significant restrictions

Size: 0 bytes
Updated on Wed, 16 Jan 2002 09:56:29 GMT
Originally uploaded on Wed, 16 Jan 2002 10:00:52 GMT
C++ Builder 5 does not allow to use auto_ptr in
standard containers, for example, list and vector.

Impossible to compile code like

list< auto_ptr< T > > l;
l.push_back( auto_ptr< T >( new T ) );

Such code work with C++ Builder 3 or MSVC++ 6.0

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03