This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [GSoC] __enable_shared_from_this_helper
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Tim Shen <timshen at google dot com>
- Cc: Fan You <youfan dot noey at gmail dot com>, Tim Shen <timshen91 at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 30 Apr 2015 18:48:27 +0100
- Subject: Re: [GSoC] __enable_shared_from_this_helper
- Authentication-results: sourceware.org; auth=none
- References: <CALvpekGVZEMtGN5MKVXrArG5cKJhqDQjsfgjdFZYk0=H=7+V_Q at mail dot gmail dot com> <20150428215024 dot GF3618 at redhat dot com> <20150428215349 dot GG3618 at redhat dot com> <CALvpekGhEJfEWdHmtOyco-Ua=sPjk4yhpFFE7Fzffy9cTmnVbA at mail dot gmail dot com> <CAG4ZjN=a9nvQ3CgqRiSze-fbUvh0u69WQQdehS5+mFXsvtSP=A at mail dot gmail dot com> <20150429100344 dot GH3618 at redhat dot com> <CAG4ZjNnFTOtEoSPdzv9Dip8s7O6o4ToL2+N-j_oEuxvrD1spLA at mail dot gmail dot com> <20150430112352 dot GR3618 at redhat dot com> <CAG4ZjNmgtF-7jE17d=e8fK_iMhkDHT783Qv1sYpt6MPKsmLL=A at mail dot gmail dot com>
On 30/04/15 10:41 -0700, Tim Shen wrote:
This is why I was asking "still as usable". This feature actually
requires more from the user, since standard didn't specify more.
Anyway, we don't need to worry about this for now.
No, we don't have to worry about it ever. Period.
Allocators that only support allocating some types cannot be used in
arbitrary places in the library. That is already true for all the
node-based containers and for std::allocate_shared and lots of other
places that rely on rebinding allocators.
We do not have to (and *cannot*) support allocators that can't be
rebound to arbitrary types. That's not a problem that needs to be
solved!