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]

Re: Patch: stl_vector.h


Paolo Carlini wrote:

All the ""trouble"" comes from the pair of __uninitialized_fill_n_a overloads that
you added recently: the first one is for std::allocator and equivalent to the old
behavior, the second one is for an user provided allocator != std::allocator, and ends
up calling __alloc::construct with a mismatched pair of arguments...

Ok, now I see it. The problem is that _Construct (used for std::allocator) has *two*
template arguments:


 template<typename _T1, typename _T2>
   inline void
   _Construct(_T1* __p, const _T2& __value)

whereas __alloc::construct (used for __alloc != std::allocator) has only one!

Paolo.




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