[committed] libstdc++: Fix reversed args in unreachable assumption [PR109849]
Checks
Commit Message
libstdc++-v3/ChangeLog:
PR libstdc++/109849
* include/bits/vector.tcc (vector::_M_range_insert): Fix
reversed args in length calculation.
---
Tested x86_64-linux, pushed to trunk. Backport to gcc-14 to follow after
testing.
libstdc++-v3/include/bits/vector.tcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -934,7 +934,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
const size_type __len =
_M_check_len(__n, "vector::_M_range_insert");
#if __cplusplus < 201103L
- if (__len < (__n + (__old_start - __old_finish)))
+ if (__len < (__n + (__old_finish - __old_start)))
__builtin_unreachable();
#endif