This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/55866] [4.8 Regression] #include <auto_ptr.h> in C++11 mode
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Jan 2013 17:01:12 +0000
- Subject: [Bug libstdc++/55866] [4.8 Regression] #include <auto_ptr.h> in C++11 mode
- Auto-submitted: auto-generated
- References: <bug-55866-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55866
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-03 17:01:12 UTC ---
The header even says so, and has done so for years:
/** @file backward/auto_ptr.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
The change was an important one that allows us to use unique_ptr and shared_ptr
internally in the library (e.g. in <future>) without depending on the whole of
<memory> and without pulling in the deprecated auto_ptr definition, as
discussed in the thread beginning at
http://gcc.gnu.org/ml/libstdc++/2012-06/msg00078.html
I don't want to revert it, and it would contradict how the entire library is
structured to make <backward/auto_ptr.h> pull in all its needed headers. If you
#include <memory> it works perfectly, anything else is unsupported.