This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] A bit of rationale about C++0x shared_ptr vs allocators


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]