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


Matt Austern wrote:

Aha! Although I think the real bug was at a higher level, and was just masked
by _Construct. I'm thinking of this:
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
{
this->_M_impl._M_start = _M_allocate(__n);
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
this->get_allocator());
this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
}


I don't see any static_cast<value_type>(__value) here, and the standard
says there's supposed to be one.

Ah, ok, therefore Dhruv's original patch is right, after all! ;) I couldn't believe
the standard actually asks for a cast there! Could you possibly point us to the
exact place where it does that?!?


Thanks,
Paolo.


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