Hello,here is a clang-friendly version of the patch (same changelog), tested a while ago. Is it ok or do you prefer something like the
+ if(this->_M_impl._M_start._M_offset != 0) __builtin_unreachable(); version suggested by François? -- Marc Glisse
Index: include/bits/stl_bvector.h =================================================================== --- include/bits/stl_bvector.h (revision 264371) +++ include/bits/stl_bvector.h (working copy) @@ -802,25 +802,25 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif #if __cplusplus >= 201103L void assign(initializer_list<bool> __l) { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif iterator begin() _GLIBCXX_NOEXCEPT - { return this->_M_impl._M_start; } + { return iterator(this->_M_impl._M_start._M_p, 0); } const_iterator begin() const _GLIBCXX_NOEXCEPT - { return this->_M_impl._M_start; } + { return const_iterator(this->_M_impl._M_start._M_p, 0); } iterator end() _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } const_iterator end() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } reverse_iterator @@ -835,21 +835,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(begin()); } const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(begin()); } #if __cplusplus >= 201103L const_iterator cbegin() const noexcept - { return this->_M_impl._M_start; } + { return const_iterator(this->_M_impl._M_start._M_p, 0); } const_iterator cend() const noexcept { return this->_M_impl._M_finish; } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator