Title
Precondition on inplace_vector::emplace
Status
wp
Section
[sequence.reqmts]
Submitter
Arthur O'Dwyer

Created on 2024-08-26.00:00:00 last changed 3 weeks ago

Messages

Date: 2024-11-28.21:40:31

Proposed resolution:

This wording is relative to N4988.

  1. Modify [sequence.reqmts] as indicated:

    a.emplace(p, args)
    

    -19- Result: iterator.

    -20- Preconditions: T is Cpp17EmplaceConstructible into X from args. For vector, inplace_vector, and deque, T is also Cpp17MoveInsertable into X and Cpp17MoveAssignable.

    -21- Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before p.

    [Note 1: args can directly or indirectly refer to a value in a. — end note]

    -22- Returns: An iterator that points to the new element constructed from args into a.

Date: 2024-11-28.21:40:31

[ Wrocław 2024-11-23; Status changed: Voting → WP. ]

Date: 2024-09-15.00:00:00

[ 2024-09-18; Reflector poll ]

Set status to Tentatively Ready after nine votes in favour during reflector poll.

Date: 2024-08-26.00:00:00

Inserting into the middle of an inplace_vector, just like inserting into the middle of a vector or deque, requires that we construct the new element out-of-line, shift down the trailing elements (Cpp17MoveAssignable), and then move-construct the new element into place (Cpp17MoveInsertable). P0843R14 failed to make this change, but it should have.

History
Date User Action Args
2024-11-28 21:40:31adminsetmessages: + msg14493
2024-11-28 21:40:31adminsetstatus: voting -> wp
2024-11-19 16:09:07adminsetstatus: ready -> voting
2024-09-18 22:30:36adminsetmessages: + msg14384
2024-09-18 22:30:36adminsetstatus: new -> ready
2024-09-01 08:46:08adminsetmessages: + msg14353
2024-08-26 00:00:00admincreate