This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] A bit of rationale about C++0x shared_ptr vs allocators
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: jwakely dot gcc at gmail dot com, pdimov at mmltd dot net
- Date: Tue, 29 Jul 2008 05:58:41 -0500 (CDT)
- Subject: [RFC] A bit of rationale about C++0x shared_ptr vs allocators
- Accept-language: en-US
Hi,
I'm noticing only now that N2232 (likewise the current draft) has:
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a );
template<class Y, class D, class A> void reset( Y * p, D d, A a );
*not*:
template<class Y, class D, class A> shared_ptr( Y * p, D d, const A& a );
template<class Y, class D, class A> void reset( Y * p, D d, const A& a );
Is it possible to have a bit of rationale? Naively (I'm indeed not a share_prt expert), it seems really strange, usually allocators are passed around by const ref...
Many thanks in advance,
Paolo.