mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-10 10:09:45 +08:00
re PR libstdc++/16611 (Terrible code generated for vector<bool>)
2006-08-06 Paolo Carlini <pcarlini@suse.de> PR libstdc++/16611 * include/bits/stl_bvector.h (vector<bool>::operator[], vector<bool>::operator[] const): Do not use iterator::operator+, hand code. From-SVN: r115972
This commit is contained in:
parent
bab1de0adb
commit
da452330ca
@ -1,3 +1,10 @@
|
||||
2006-08-06 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/16611
|
||||
* include/bits/stl_bvector.h (vector<bool>::operator[],
|
||||
vector<bool>::operator[] const): Do not use iterator::operator+,
|
||||
hand code.
|
||||
|
||||
2006-08-05 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/28587
|
||||
|
@ -575,11 +575,17 @@ template<typename _Alloc>
|
||||
|
||||
reference
|
||||
operator[](size_type __n)
|
||||
{ return *(begin() + difference_type(__n)); }
|
||||
{
|
||||
return *iterator(this->_M_impl._M_start._M_p
|
||||
+ __n / int(_S_word_bit), __n % int(_S_word_bit));
|
||||
}
|
||||
|
||||
const_reference
|
||||
operator[](size_type __n) const
|
||||
{ return *(begin() + difference_type(__n)); }
|
||||
{
|
||||
return *const_iterator(this->_M_impl._M_start._M_p
|
||||
+ __n / int(_S_word_bit), __n % int(_S_word_bit));
|
||||
}
|
||||
|
||||
protected:
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user