зеркало из https://github.com/microsoft/STL.git
Update comments for February 2021 LWG issues (#1686)
This commit is contained in:
Родитель
90ea364a57
Коммит
b84fbcf496
|
@ -1084,7 +1084,7 @@ public:
|
|||
}
|
||||
|
||||
// [counted.iter.access]
|
||||
_NODISCARD constexpr const _Iter& base() const& noexcept /* strengthened */ { // Per LWG-3391
|
||||
_NODISCARD constexpr const _Iter& base() const& noexcept /* strengthened */ {
|
||||
return _Current;
|
||||
}
|
||||
|
||||
|
|
|
@ -2525,7 +2525,8 @@ namespace ranges {
|
|||
|
||||
_NODISCARD constexpr auto begin() {
|
||||
#if _CONTAINER_DEBUG_LEVEL > 0
|
||||
_STL_VERIFY(_Pred, "LWG-3490 forbids calling begin on a drop_while_view with no predicate");
|
||||
_STL_VERIFY(
|
||||
_Pred, "N4885 [range.drop.while.view] forbids calling begin on a drop_while_view with no predicate");
|
||||
#endif // _CONTAINER_DEBUG_LEVEL > 0
|
||||
if constexpr (forward_range<_Vw>) {
|
||||
if (this->_Has_cache()) {
|
||||
|
@ -3776,7 +3777,6 @@ namespace ranges {
|
|||
}
|
||||
|
||||
constexpr void operator++(int) noexcept(noexcept(++_Current)) /* strengthened */ {
|
||||
// Constraint removed per LWG-3492
|
||||
++_Current;
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ protected:
|
|||
const auto _Seeklow = eback();
|
||||
const auto _Seekdist = _Seekhigh - _Seeklow;
|
||||
|
||||
// [depr.strstreambuf.virtuals]/15 effectively says check that the result will be in range
|
||||
// N4727 [depr.strstreambuf.virtuals]/15 effectively says check that the result will be in range
|
||||
// [_Seeklow, _Seekhigh]; but we want to calculate this without potential integer overflow
|
||||
switch (_Way) {
|
||||
case ios_base::beg:
|
||||
|
|
|
@ -3598,7 +3598,6 @@ namespace ranges {
|
|||
}
|
||||
|
||||
constexpr subrange& advance(const iter_difference_t<_It> _Count) {
|
||||
// Per LWG-3413, this has defined behavior when _Count < 0.
|
||||
if constexpr (bidirectional_iterator<_It>) {
|
||||
if (_Count < 0) {
|
||||
_RANGES advance(_First, _Count);
|
||||
|
@ -3762,7 +3761,7 @@ public:
|
|||
// clang-format on
|
||||
|
||||
#ifdef __cpp_lib_concepts
|
||||
_NODISCARD constexpr const iterator_type& base() const& noexcept /* strengthened */ { // Per LWG-3391
|
||||
_NODISCARD constexpr const iterator_type& base() const& noexcept /* strengthened */ {
|
||||
return _Current;
|
||||
}
|
||||
_NODISCARD constexpr iterator_type base() && noexcept(is_nothrow_move_constructible_v<_Iter>) /* strengthened */ {
|
||||
|
|
|
@ -21,7 +21,7 @@ void test_view_predicate() {
|
|||
|
||||
void test_view_begin() {
|
||||
DWV r;
|
||||
(void) r.begin(); // LWG-3490 forbids calling begin on a drop_while_view with no predicate
|
||||
(void) r.begin(); // N4885 [range.drop.while.view] forbids calling begin on a drop_while_view with no predicate
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче