This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: should <bits/unique_ptr.h> include <backward/auto_ptr.h>?
- From: Benjamin De Kosnik <bkoz at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 25 Jun 2012 15:54:21 -0700
- Subject: Re: should <bits/unique_ptr.h> include <backward/auto_ptr.h>?
- References: <CAH6eHdS5bOwj+u=9pX5fuXOz52DAWJP0kaMSDgHbO2F9h0ZcEA@mail.gmail.com>
> I'm working on std::wstring_convert and want to use std::unique_ptr.
Yay for working on this. Using std::unique_ptr seems like something we
should be encouraging!!!
> To avoid <locale> pulling in the whole of <memory> I only want to
> include unique_ptr.h, but that means I also need to include
> <backward/auto_ptr.h>. If bits/unique_ptr.h included auto_ptr.h
> itself then we could just use unique_ptr.h elsewhere in the library
> more easily.
Hmm. Can you detail why you need auto_ptr.h at all? I must be missing
something. I see there are no current includes of it in any bits
headers, which seems ideal.
> Currently <future> includes the whole of <memory> but IIRC all it
> really needs is unique_ptr.h, shared_ptr.h and allocator.h
bits/memory_base.h?
bits/memory_classes.h?
-benjamin