Skip to content
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stl/inc/xstring
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct _Char_traits { // properties of a string or stream element
#ifdef __cpp_lib_is_constant_evaluated
if (_STD is_constant_evaluated()) {
// pre: [_First1, _First1 + _Count) and [_First2, _First2 + _Count) do not overlap; see LWG-3085
for (size_t _Idx = 0; _Idx < _Count; ++_Idx) {
for (size_t _Idx = 0; _Idx != _Count; ++_Idx) {
_First1[_Idx] = _First2[_Idx];
}

Expand Down Expand Up @@ -106,12 +106,12 @@ struct _Char_traits { // properties of a string or stream element
}

if (_Loop_forward) {
for (size_t _Idx = 0; _Idx < _Count; ++_Idx) {
for (size_t _Idx = 0; _Idx != _Count; ++_Idx) {
_First1[_Idx] = _First2[_Idx];
}
} else {
for (size_t _Idx = 0; _Idx < _Count; ++_Idx) {
_First1[_Count - 1 - _Idx] = _First2[_Count - 1 - _Idx];
for (size_t _Idx = _Count; _Idx != 0; --_Idx) {
_First1[_Idx - 1] = _First2[_Idx - 1];
}
}

Expand Down