Title
Formatting move-only iterators take two
Status
ready
Section
[format.context]
Submitter
Casey Carter

Created on 2021-06-08.00:00:00 last changed 1 month ago

Messages

Date: 2021-06-23.14:16:45

Proposed resolution:

This wording is relative to N4885.

  1. Modify [format.context] as indicated:

    iterator out();
    

    -7- Returns: out_.Effects: Equivalent to: return std::move(out_);

    void advance_to(iterator it);
    

    -8- Effects: Equivalent to: out_ = std::move(it);

Date: 2021-06-15.00:00:00

[ 2021-06-23; Reflector poll ]

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

Date: 2021-06-08.00:00:00

LWG 3539 fixed copies of potentially-move-only iterators in the format_to and vformat_to overloads, but missed the fact that member functions of basic_format_context are specified to copy iterators as well. In particular, [format.context] states:

iterator out();

-7- Returns: out_.

void advance_to(iterator it);

-8- Effects: Equivalent to: out_ = it;

both of which appear to require copyability.

History
Date User Action Args
2021-06-23 14:16:45adminsetmessages: + msg11963
2021-06-23 14:16:45adminsetstatus: new -> ready
2021-06-12 13:17:17adminsetmessages: + msg11922
2021-06-08 00:00:00admincreate