Patch: stl_vector.h
Paolo Carlini
pcarlini@suse.de
Sat Oct 16 20:41:00 GMT 2004
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.
More information about the Libstdc++
mailing list