diff --git a/issue4123.html b/issue4123.html index 8333346acf..6f639ad3a6 100644 --- a/issue4123.html +++ b/issue4123.html @@ -137,13 +137,378 @@

4123. Container effects use "th This should talk about calls to allocator_traits::destroy.

+23.3.5.4 [deque.modifiers] is similar. Look for similar problems elsewhere.

+

[2024-12-06; Jonathan adds wording, incorporating Arthur's wording]

+ +

Proposed resolution:

+This wording is relative to N4993. +

+ +
    +
  1. +

    Modify 23.3.5.3 [deque.capacity] as indicated:

    +
    +
    void shrink_to_fit();
    +

    +-5- Preconditions: +T is CppMoveInsertable into deque. +

    +

    +-6- Effects: +shrink_to_fit is a non-binding request to reduce memory use +but does not change the size of the sequence. +[Note 1: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +If the size is equal to the old capacity, or +if an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +then there are no effects. +

    +
    +
  2. +
  3. +

    Modify 23.3.5.4 [deque.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Effects: [...] +

    +

    +-2- Complexity: +The complexity is linear in the number of elements inserted plus +the lesser of the distances to the beginning and end of the deque. +Inserting a single element at either the beginning or end of a deque +always takes constant time and causes +a single call to a constructor of T +construction of a single object of type T. +

    +

    +-3- Remarks: +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of T + + +construction or assignment of one object of type T from another +, +there are no effects. +If an exception is thrown while inserting a single element at either end, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    [...]

    +-5- Throws: +Nothing unless an exception is thrown by +the assignment operator of T + +the assignment of one object of type T from another +. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +

    +-4- Effects: +An erase operation that erases the last element of a deque invalidates only +the past-the-end iterator +and all iterators and references to the erased elements. +An erase operation that erases the first element of a deque but not the last +element invalidates only iterators and references to the erased elements. +An erase operation that erases neither the first element nor the last element +of a deque invalidates the past-the-end iterator and all iterators and +references to all the elements of the deque. +

    +

    +[Note 1: +pop_front and pop_back are erase operations. +— end note] +

    +

    +-5- Throws: +Nothing unless an exception is thrown by thean +assignment operator of T. +

    +

    +-6- Complexity: +The number of +calls to the destructor of T +objects of type T destroyed +is the same as the number of +elements erased, but the number of calls to the assignment operator of T +is no more than the lesser of the number of elements before the erased +elements and the number of elements after the erased elements. +

    +
    +
  4. +
  5. +

    Modify 23.3.7.5 [forward.list.modifiers] as indicated:

    +
    +

    +-1- [...] +Inserting n elements into a forward_list is linear in +n, and the number of calls to the copy or move constructor of +objects of type T constructed is +exactly equal to n. Erasing n elements from a forward_list is +linear in n and the number of calls to the destructor of +objects of type T destroyed is exactly equal to n. +

    +
    +
  6. +
  7. +

    Modify 23.3.9.4 [list.modifiers] as indicated:

    +
    +

    +-1- Complexity: +Insertion of a single element into a list takes constant time and exactly one +call to a constructor of T +object of type T is constructed +Insertion of multiple elements into a list is linear in the number of +elements inserted and the number of +calls to the copy constructor or move constructor of T +objects of type T constructed +is exactly equal to the number of elements inserted. +

    +

    +-2- Remarks: +Does not affect the validity of iterators and references. +If an exception is thrown, there are no effects. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +void clear() noexcept;
    +

    +-3- Effects: +Invalidates only the iterators and references to the erased elements. +

    +

    +-4- Throws: Nothing. +

    +

    +-5- Complexity: +Erasing a single element is a constant time operation with a single +call to the destructor of T +object of type T destroyed. +Erasing a range in a list is linear time in the +size of the range and the number of +calls to the destructor of type T +objects of type T destroyed +is exactly equal to the size of the range. +

    +
    +
  8. +
  9. +

    Modify 23.3.11.2 [vector.cons] as indicated:

    +
    +
    template<class InputIterator>
    +  constexpr vector(InputIterator first, InputIterator last,
    +                   const Allocator& = Allocator());
    +

    +-9- Effects: +Constructs a vector equal to the range [first, last), +using the specified allocator. +

    +

    +-10- Complexity: +Makes only N calls to the copy constructor of +Initializes exactly N objects of type +T +(where N is the distance between first and last) +and no reallocations if iterators first and last are of forward, +bidirectional, or random access categories. +It makes initializes order +N +calls to the copy constructor of +objects of type +T and performs +order log N reallocations if they are just input iterators. +

    +
    template<container-compatible-range<T> R>
    +  constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator());
    +

    +-11- Effects: +Constructs a vector object with the elements of the range rg, +using the specified allocator. +

    +

    +-12- Complexity: +Initializes exactly N elements from the results of dereferencing +successive iterators of rg, where N is ranges::distance(rg). +Performs no reallocations if R models ranges::forward_range or +ranges::sized_range; otherwise, performs order log N reallocations +and initializes order N +calls to the copy or move constructor of +objects of type T. +

    +
    +
  10. +
  11. +

    Modify 23.3.11.3 [vector.capacity] as indicated:

    +
    +
    constexpr void reserve(size_type n);
    +

    +-3- Preconditions: +T is CppMoveInsertable into vector. +

    +

    +-4- Effects: +A directive that informs a vector of a planned change in size, +so that it can manage the storage allocation accordingly. +After reserve<del>()</del>, capacity() is greater or equal to +the argument of reserve if reallocation happens; +and equal to the previous value of capacity() otherwise. +Reallocation happens at this point if and only if +the current capacity is less than the argument of reserve<del>()</del>. +If an exception is thrown other than by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type T from another, there are no effects. +

    +

    [...]

    +
    constexpr shrink_to_fit();
    +

    +-8- Preconditions: +T is CppMoveInsertable into vector.

    +

    +-9- Effects: +shrink_to_fit is a non-binding request to reduce capacity() to size(). +[Note 2: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +It does not increase capacity(), but may reduce capacity() by causing +reallocation. +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +

    [...]

    +
    constexpr void resize(size_type sz);
    +

    +-14- Preconditions: +T is Cpp17MoveInsertable and Cpp17DefaultInsertable into +vector. +

    +

    +-15- Effects: [...] +

    +

    +-16- Remarks: +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +
    +
  12. +
  13. +

    Modify 23.3.11.5 [vector.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Complexity: [...] +

    +

    +-2- Remarks: +Causes reallocation if the new size is greater than the old capacity. +Reallocation invalidates all the references, pointers, and iterators +referring to the elements in the sequence, as well as the past-the-end iterator. +If no reallocation happens, then +references, pointers, and iterators +before the insertion point remain valid +but those at or after the insertion point, +including the past-the-end iterator, +are invalidated. +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of +T or by any \tcode{InputIterator} operation +the construction or assignment of one object of type T from another, +or by any InputIterator operation, +there are no effects. +If an exception is thrown while inserting a single element at the end and +T is Cpp17CopyInsertable or +is_nothrow_move_constructible_v<T> is true, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-3- Effects: +Invalidates iterators and references at or after the point of the erase. +

    +

    +-4- Throws: +Nothing unless an exception is thrown by the +assignment operator or move assignment operator of T +construction or assignment of one object of type T from another. +

    +

    +-5- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements in the vector after the erased elements. +

    +
    +
  14. +
  15. +

    Modify 23.3.14.5 [inplace.vector.modifiers] as indicated:

    +
    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-29- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements after the erased elements. +

    +
    +
  16. + +
diff --git a/lwg-active.html b/lwg-active.html index 2acd703dc2..bc23a4b918 100644 --- a/lwg-active.html +++ b/lwg-active.html @@ -79,7 +79,7 @@

C++ Standard Library Active Issues List (Revision D125)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Reference ISO/IEC IS 14882:2020(E)

Also see:

@@ -62793,13 +62793,378 @@

4123[deque.modifiers] is similar. Look for similar problems elsewhere.

+

[2024-12-06; Jonathan adds wording, incorporating Arthur's wording]

+ +

Proposed resolution:

+This wording is relative to N4993. +

+ +
    +
  1. +

    Modify 23.3.5.3 [deque.capacity] as indicated:

    +
    +
    void shrink_to_fit();
    +

    +-5- Preconditions: +T is CppMoveInsertable into deque. +

    +

    +-6- Effects: +shrink_to_fit is a non-binding request to reduce memory use +but does not change the size of the sequence. +[Note 1: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +If the size is equal to the old capacity, or +if an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +then there are no effects. +

    +
    +
  2. +
  3. +

    Modify 23.3.5.4 [deque.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Effects: [...] +

    +

    +-2- Complexity: +The complexity is linear in the number of elements inserted plus +the lesser of the distances to the beginning and end of the deque. +Inserting a single element at either the beginning or end of a deque +always takes constant time and causes +a single call to a constructor of T +construction of a single object of type T. +

    +

    +-3- Remarks: +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of T + + +construction or assignment of one object of type T from another +, +there are no effects. +If an exception is thrown while inserting a single element at either end, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    [...]

    +-5- Throws: +Nothing unless an exception is thrown by +the assignment operator of T + +the assignment of one object of type T from another +. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +

    +-4- Effects: +An erase operation that erases the last element of a deque invalidates only +the past-the-end iterator +and all iterators and references to the erased elements. +An erase operation that erases the first element of a deque but not the last +element invalidates only iterators and references to the erased elements. +An erase operation that erases neither the first element nor the last element +of a deque invalidates the past-the-end iterator and all iterators and +references to all the elements of the deque. +

    +

    +[Note 1: +pop_front and pop_back are erase operations. +— end note] +

    +

    +-5- Throws: +Nothing unless an exception is thrown by thean +assignment operator of T. +

    +

    +-6- Complexity: +The number of +calls to the destructor of T +objects of type T destroyed +is the same as the number of +elements erased, but the number of calls to the assignment operator of T +is no more than the lesser of the number of elements before the erased +elements and the number of elements after the erased elements. +

    +
    +
  4. +
  5. +

    Modify 23.3.7.5 [forward.list.modifiers] as indicated:

    +
    +

    +-1- [...] +Inserting n elements into a forward_list is linear in +n, and the number of calls to the copy or move constructor of +objects of type T constructed is +exactly equal to n. Erasing n elements from a forward_list is +linear in n and the number of calls to the destructor of +objects of type T destroyed is exactly equal to n. +

    +
    +
  6. +
  7. +

    Modify 23.3.9.4 [list.modifiers] as indicated:

    +
    +

    +-1- Complexity: +Insertion of a single element into a list takes constant time and exactly one +call to a constructor of T +object of type T is constructed +Insertion of multiple elements into a list is linear in the number of +elements inserted and the number of +calls to the copy constructor or move constructor of T +objects of type T constructed +is exactly equal to the number of elements inserted. +

    +

    +-2- Remarks: +Does not affect the validity of iterators and references. +If an exception is thrown, there are no effects. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +void clear() noexcept;
    +

    +-3- Effects: +Invalidates only the iterators and references to the erased elements. +

    +

    +-4- Throws: Nothing. +

    +

    +-5- Complexity: +Erasing a single element is a constant time operation with a single +call to the destructor of T +object of type T destroyed. +Erasing a range in a list is linear time in the +size of the range and the number of +calls to the destructor of type T +objects of type T destroyed +is exactly equal to the size of the range. +

    +
    +
  8. +
  9. +

    Modify 23.3.11.2 [vector.cons] as indicated:

    +
    +
    template<class InputIterator>
    +  constexpr vector(InputIterator first, InputIterator last,
    +                   const Allocator& = Allocator());
    +

    +-9- Effects: +Constructs a vector equal to the range [first, last), +using the specified allocator. +

    +

    +-10- Complexity: +Makes only N calls to the copy constructor of +Initializes exactly N objects of type +T +(where N is the distance between first and last) +and no reallocations if iterators first and last are of forward, +bidirectional, or random access categories. +It makes initializes order +N +calls to the copy constructor of +objects of type +T and performs +order log N reallocations if they are just input iterators. +

    +
    template<container-compatible-range<T> R>
    +  constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator());
    +

    +-11- Effects: +Constructs a vector object with the elements of the range rg, +using the specified allocator. +

    +

    +-12- Complexity: +Initializes exactly N elements from the results of dereferencing +successive iterators of rg, where N is ranges::distance(rg). +Performs no reallocations if R models ranges::forward_range or +ranges::sized_range; otherwise, performs order log N reallocations +and initializes order N +calls to the copy or move constructor of +objects of type T. +

    +
    +
  10. +
  11. +

    Modify 23.3.11.3 [vector.capacity] as indicated:

    +
    +
    constexpr void reserve(size_type n);
    +

    +-3- Preconditions: +T is CppMoveInsertable into vector. +

    +

    +-4- Effects: +A directive that informs a vector of a planned change in size, +so that it can manage the storage allocation accordingly. +After reserve<del>()</del>, capacity() is greater or equal to +the argument of reserve if reallocation happens; +and equal to the previous value of capacity() otherwise. +Reallocation happens at this point if and only if +the current capacity is less than the argument of reserve<del>()</del>. +If an exception is thrown other than by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type T from another, there are no effects. +

    +

    [...]

    +
    constexpr shrink_to_fit();
    +

    +-8- Preconditions: +T is CppMoveInsertable into vector. +

    +

    +-9- Effects: +shrink_to_fit is a non-binding request to reduce capacity() to size(). +[Note 2: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +It does not increase capacity(), but may reduce capacity() by causing +reallocation. +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +

    [...]

    +
    constexpr void resize(size_type sz);
    +

    +-14- Preconditions: +T is Cpp17MoveInsertable and Cpp17DefaultInsertable into +vector. +

    +

    +-15- Effects: [...] +

    +

    +-16- Remarks: +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +
    +
  12. +
  13. +

    Modify 23.3.11.5 [vector.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Complexity: [...] +

    +

    +-2- Remarks: +Causes reallocation if the new size is greater than the old capacity. +Reallocation invalidates all the references, pointers, and iterators +referring to the elements in the sequence, as well as the past-the-end iterator. +If no reallocation happens, then +references, pointers, and iterators +before the insertion point remain valid +but those at or after the insertion point, +including the past-the-end iterator, +are invalidated. +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of +T or by any \tcode{InputIterator} operation +the construction or assignment of one object of type T from another, +or by any InputIterator operation, +there are no effects. +If an exception is thrown while inserting a single element at the end and +T is Cpp17CopyInsertable or +is_nothrow_move_constructible_v<T> is true, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-3- Effects: +Invalidates iterators and references at or after the point of the erase.

    +

    +-4- Throws: +Nothing unless an exception is thrown by the +assignment operator or move assignment operator of T +construction or assignment of one object of type T from another. +

    +

    +-5- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements in the vector after the erased elements. +

    +
    +
  14. +
  15. +

    Modify 23.3.14.5 [inplace.vector.modifiers] as indicated:

    +
    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-29- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements after the erased elements. +

    +
    +
  16. + +
diff --git a/lwg-closed.html b/lwg-closed.html index b8306949da..a05a43fbbe 100644 --- a/lwg-closed.html +++ b/lwg-closed.html @@ -79,7 +79,7 @@

C++ Standard Library Closed Issues List (Revision D125)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Reference ISO/IEC IS 14882:2020(E)

Also see:

diff --git a/lwg-defects.html b/lwg-defects.html index cd806f9082..400128dca4 100644 --- a/lwg-defects.html +++ b/lwg-defects.html @@ -79,7 +79,7 @@

C++ Standard Library Defect Reports and Accepted Issues (Revision D125)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Reference ISO/IEC IS 14882:2020(E)

Also see:

diff --git a/lwg-immediate.html b/lwg-immediate.html index f62753cd31..57c3541797 100644 --- a/lwg-immediate.html +++ b/lwg-immediate.html @@ -62,7 +62,7 @@

C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HER Date: -Revised 2024-12-06 at 17:32:07 UTC +Revised 2024-12-06 at 20:57:43 UTC diff --git a/lwg-index-open.html b/lwg-index-open.html index d8ae037ddb..430ce1655d 100644 --- a/lwg-index-open.html +++ b/lwg-index-open.html @@ -66,7 +66,7 @@

Index by Section

This document is the Index by Section for the Library Active Issues List.

Index by Section (non-Ready active issues only)

(view all issues)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Section 3 (2 issues)

(view all issues)

@@ -2140,7 +2140,7 @@

Section 23 (57 issues)

- + diff --git a/lwg-index.html b/lwg-index.html index 33c1f48104..dae7b3d881 100644 --- a/lwg-index.html +++ b/lwg-index.html @@ -66,7 +66,7 @@

Index by Section

This document is the Index by Section for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

Index by Section

(view only non-Ready open issues)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Section 2 (2 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -11879,7 +11879,7 @@

Section 23 (376 issues)

- + diff --git a/lwg-ready.html b/lwg-ready.html index 76f10e67be..9138eed6ce 100644 --- a/lwg-ready.html +++ b/lwg-ready.html @@ -62,7 +62,7 @@

C++ Standard Library Issues to be moved in [INSERT CURRENT MEETING HERE]

- diff --git a/lwg-status-date.html b/lwg-status-date.html index 5cc8025300..94fde681a9 100644 --- a/lwg-status-date.html +++ b/lwg-status-date.html @@ -67,7 +67,7 @@

Index by Status and Date

This document is the Index by Status and Date for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Tentatively NAD (9 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
Date:Revised 2024-12-06 at 17:32:07 UTC +Revised 2024-12-06 at 20:57:43 UTC
@@ -177,7 +177,7 @@

New (442 issues)

- + diff --git a/lwg-status.html b/lwg-status.html index 46f188d4eb..f69ca299ea 100644 --- a/lwg-status.html +++ b/lwg-status.html @@ -62,7 +62,7 @@

Index by Status and Section

Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Tentatively NAD (9 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -1655,7 +1655,7 @@

New (442 issues)

- + diff --git a/lwg-tentative.html b/lwg-tentative.html index b8fca02bb4..7070a8ed43 100644 --- a/lwg-tentative.html +++ b/lwg-tentative.html @@ -54,7 +54,7 @@ -

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Tentative Issues


3908(i). enumerate_view::iterator constructor is explicit

diff --git a/lwg-toc.html b/lwg-toc.html index dba7f166df..2b061bb5ed 100644 --- a/lwg-toc.html +++ b/lwg-toc.html @@ -59,7 +59,7 @@

Table of Contents

Reference ISO/IEC IS 14882:2024(E)

This document is the Table of Contents for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -33062,7 +33062,7 @@

Table of Contents

- + diff --git a/lwg-unresolved.html b/lwg-unresolved.html index da5bbe41a5..5697ff5d95 100644 --- a/lwg-unresolved.html +++ b/lwg-unresolved.html @@ -54,7 +54,7 @@ -

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Unresolved Issues


423(i). Effects of negative streamsize in iostreams

@@ -60129,13 +60129,378 @@

4123[deque.modifiers] is similar. Look for similar problems elsewhere.

+

[2024-12-06; Jonathan adds wording, incorporating Arthur's wording]

+ +

Proposed resolution:

+This wording is relative to N4993. +

+ +
    +
  1. +

    Modify 23.3.5.3 [deque.capacity] as indicated:

    +
    +
    void shrink_to_fit();
    +

    +-5- Preconditions: +T is CppMoveInsertable into deque. +

    +

    +-6- Effects: +shrink_to_fit is a non-binding request to reduce memory use +but does not change the size of the sequence. +[Note 1: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +If the size is equal to the old capacity, or +if an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +then there are no effects. +

    +
    +
  2. +
  3. +

    Modify 23.3.5.4 [deque.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Effects: [...] +

    +

    +-2- Complexity: +The complexity is linear in the number of elements inserted plus +the lesser of the distances to the beginning and end of the deque. +Inserting a single element at either the beginning or end of a deque +always takes constant time and causes +a single call to a constructor of T +construction of a single object of type T. +

    +

    +-3- Remarks: +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of T + + +construction or assignment of one object of type T from another +, +there are no effects. +If an exception is thrown while inserting a single element at either end, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    [...]

    +-5- Throws: +Nothing unless an exception is thrown by +the assignment operator of T + +the assignment of one object of type T from another +. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +

    +-4- Effects: +An erase operation that erases the last element of a deque invalidates only +the past-the-end iterator +and all iterators and references to the erased elements. +An erase operation that erases the first element of a deque but not the last +element invalidates only iterators and references to the erased elements. +An erase operation that erases neither the first element nor the last element +of a deque invalidates the past-the-end iterator and all iterators and +references to all the elements of the deque. +

    +

    +[Note 1: +pop_front and pop_back are erase operations. +— end note] +

    +

    +-5- Throws: +Nothing unless an exception is thrown by thean +assignment operator of T. +

    +

    +-6- Complexity: +The number of +calls to the destructor of T +objects of type T destroyed +is the same as the number of +elements erased, but the number of calls to the assignment operator of T +is no more than the lesser of the number of elements before the erased +elements and the number of elements after the erased elements. +

    +
    +
  4. +
  5. +

    Modify 23.3.7.5 [forward.list.modifiers] as indicated:

    +
    +

    +-1- [...] +Inserting n elements into a forward_list is linear in +n, and the number of calls to the copy or move constructor of +objects of type T constructed is +exactly equal to n. Erasing n elements from a forward_list is +linear in n and the number of calls to the destructor of +objects of type T destroyed is exactly equal to n. +

    +
    +
  6. +
  7. +

    Modify 23.3.9.4 [list.modifiers] as indicated:

    +
    +

    +-1- Complexity: +Insertion of a single element into a list takes constant time and exactly one +call to a constructor of T +object of type T is constructed +Insertion of multiple elements into a list is linear in the number of +elements inserted and the number of +calls to the copy constructor or move constructor of T +objects of type T constructed +is exactly equal to the number of elements inserted. +

    +

    +-2- Remarks: +Does not affect the validity of iterators and references. +If an exception is thrown, there are no effects. +

    +
    iterator erase(const_iterator position);
    +iterator erase(const_iterator first, const_iterator last);
    +void pop_front();
    +void pop_back();
    +void clear() noexcept;
    +

    +-3- Effects: +Invalidates only the iterators and references to the erased elements. +

    +

    +-4- Throws: Nothing. +

    +

    +-5- Complexity: +Erasing a single element is a constant time operation with a single +call to the destructor of T +object of type T destroyed. +Erasing a range in a list is linear time in the +size of the range and the number of +calls to the destructor of type T +objects of type T destroyed +is exactly equal to the size of the range. +

    +
    +
  8. +
  9. +

    Modify 23.3.11.2 [vector.cons] as indicated:

    +
    +
    template<class InputIterator>
    +  constexpr vector(InputIterator first, InputIterator last,
    +                   const Allocator& = Allocator());
    +

    +-9- Effects: +Constructs a vector equal to the range [first, last), +using the specified allocator. +

    +

    +-10- Complexity: +Makes only N calls to the copy constructor of +Initializes exactly N objects of type +T +(where N is the distance between first and last) +and no reallocations if iterators first and last are of forward, +bidirectional, or random access categories. +It makes initializes order +N +calls to the copy constructor of +objects of type +T and performs +order log N reallocations if they are just input iterators. +

    +
    template<container-compatible-range<T> R>
    +  constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator());
    +

    +-11- Effects: +Constructs a vector object with the elements of the range rg, +using the specified allocator. +

    +

    +-12- Complexity: +Initializes exactly N elements from the results of dereferencing +successive iterators of rg, where N is ranges::distance(rg). +Performs no reallocations if R models ranges::forward_range or +ranges::sized_range; otherwise, performs order log N reallocations +and initializes order N +calls to the copy or move constructor of +objects of type T. +

    +
    +
  10. +
  11. +

    Modify 23.3.11.3 [vector.capacity] as indicated:

    +
    +
    constexpr void reserve(size_type n);
    +

    +-3- Preconditions: +T is CppMoveInsertable into vector. +

    +

    +-4- Effects: +A directive that informs a vector of a planned change in size, +so that it can manage the storage allocation accordingly. +After reserve<del>()</del>, capacity() is greater or equal to +the argument of reserve if reallocation happens; +and equal to the previous value of capacity() otherwise. +Reallocation happens at this point if and only if +the current capacity is less than the argument of reserve<del>()</del>. +If an exception is thrown other than by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type T from another, there are no effects. +

    +

    [...]

    +
    constexpr shrink_to_fit();
    +

    +-8- Preconditions: +T is CppMoveInsertable into vector. +

    +

    +-9- Effects: +shrink_to_fit is a non-binding request to reduce capacity() to size(). +[Note 2: +The request is non-binding to allow latitude for +implementation-specific optimizations. +— end note] +It does not increase capacity(), but may reduce capacity() by causing +reallocation. +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +

    [...]

    +
    constexpr void resize(size_type sz);
    +

    +-14- Preconditions: +T is Cpp17MoveInsertable and Cpp17DefaultInsertable into +vector. +

    +

    +-15- Effects: [...] +

    +

    +-16- Remarks: +If an exception is thrown other than by the move constructor +move-construction of one object +of a non-Cpp17CopyInsertable type T +from another, +there are no effects. +

    +
    +
  12. +
  13. +

    Modify 23.3.11.5 [vector.modifiers] as indicated:

    +
    +
    iterator insert(const_iterator position, const T& x);
    +...
    +template<container-compatible-range<T> R>
    +  void append_range(R&& rg);
    +

    +-1- Complexity: [...] +

    +

    +-2- Remarks: +Causes reallocation if the new size is greater than the old capacity. +Reallocation invalidates all the references, pointers, and iterators +referring to the elements in the sequence, as well as the past-the-end iterator. +If no reallocation happens, then +references, pointers, and iterators +before the insertion point remain valid +but those at or after the insertion point, +including the past-the-end iterator, +are invalidated. +If an exception is thrown other than by the +copy constructor, move constructor, +assignment operator, or move assignment operator of +T or by any \tcode{InputIterator} operation +the construction or assignment of one object of type T from another, +or by any InputIterator operation, +there are no effects. +If an exception is thrown while inserting a single element at the end and +T is Cpp17CopyInsertable or +is_nothrow_move_constructible_v<T> is true, +there are no effects. +Otherwise, if an exception is thrown by the +move constructor of a +move-construction of one object of +non-Cpp17CopyInsertable +type +T from another, the effects are unspecified. +

    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-3- Effects: +Invalidates iterators and references at or after the point of the erase.

    +

    +-4- Throws: +Nothing unless an exception is thrown by the +assignment operator or move assignment operator of T +construction or assignment of one object of type T from another. +

    +

    +-5- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements in the vector after the erased elements. +

    +
    +
  14. +
  15. +

    Modify 23.3.14.5 [inplace.vector.modifiers] as indicated:

    +
    +
    constexpr iterator erase(const_iterator position);
    +constexpr iterator erase(const_iterator first, const_iterator last);
    +constexpr void pop_back();
    +

    +-29- Complexity: +The +destructor of T is called the number of times +number of objects of type T destroyed is +equal to the number of the elements erased, +but thean +assignment operator of T is called the number of times equal to +the number of elements after the erased elements. +

    +
    +
  16. + +
diff --git a/unresolved-index.html b/unresolved-index.html index acf5104327..e18a1f8f37 100644 --- a/unresolved-index.html +++ b/unresolved-index.html @@ -66,7 +66,7 @@

Index by Section

This document is the Index by Section for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

Index by Section

(view only non-Ready open issues)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Section 3 (2 issues)

(view only non-Ready open issues)

Issue New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -2140,7 +2140,7 @@

Section 23 (57 issues)

- + diff --git a/unresolved-prioritized.html b/unresolved-prioritized.html index 1906f66267..d69dacdbb5 100644 --- a/unresolved-prioritized.html +++ b/unresolved-prioritized.html @@ -60,7 +60,7 @@

Table of Contents

This document is the Table of Contents for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List, sorted by priority.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Priority 1 (2 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -1982,7 +1982,7 @@

Priority 3 (377 issues)

- + diff --git a/unresolved-status-date.html b/unresolved-status-date.html index 5f6d31f42f..f8d85fb535 100644 --- a/unresolved-status-date.html +++ b/unresolved-status-date.html @@ -67,7 +67,7 @@

Index by Status and Date

This document is the Index by Status and Date for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

New (442 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -84,7 +84,7 @@

Index by Status and Date

- + diff --git a/unresolved-status.html b/unresolved-status.html index 867dee9523..a275f02ac0 100644 --- a/unresolved-status.html +++ b/unresolved-status.html @@ -62,7 +62,7 @@

Index by Status and Section

Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

New (442 issues)

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -1562,7 +1562,7 @@

Index by Status and Section

- + diff --git a/unresolved-toc.html b/unresolved-toc.html index 6f2afc0f8d..d134d5d0fa 100644 --- a/unresolved-toc.html +++ b/unresolved-toc.html @@ -59,7 +59,7 @@

Table of Contents

Reference ISO/IEC IS 14882:2024(E)

This document is the Table of Contents for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
@@ -4847,7 +4847,7 @@

Table of Contents

- + diff --git a/votable-index.html b/votable-index.html index 344eb021b9..ecb8d293a5 100644 --- a/votable-index.html +++ b/votable-index.html @@ -66,6 +66,6 @@

Index by Section

This document is the Index by Section for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

Index by Section

(view only non-Ready open issues)

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

diff --git a/votable-status-date.html b/votable-status-date.html index c2db4d7c67..5044ac8491 100644 --- a/votable-status-date.html +++ b/votable-status-date.html @@ -67,6 +67,6 @@

Index by Status and Date

This document is the Index by Status and Date for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

diff --git a/votable-status.html b/votable-status.html index 86a9175b44..6798c91e31 100644 --- a/votable-status.html +++ b/votable-status.html @@ -62,6 +62,6 @@

Index by Status and Section

Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

diff --git a/votable-toc.html b/votable-toc.html index 4df5e8a8b9..0906087fc8 100644 --- a/votable-toc.html +++ b/votable-toc.html @@ -59,7 +59,7 @@

Table of Contents

Reference ISO/IEC IS 14882:2024(E)

This document is the Table of Contents for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.

-

Revised 2024-12-06 at 17:32:07 UTC +

Revised 2024-12-06 at 20:57:43 UTC

Issue New 23.3.5.4 [deque.modifiers] Container effects use "the assignment operator or move assignment operator"NoYes 3
Issue