Title
Normative encouragement in non-normative note
Status
c++23
Section
[format.args]
Submitter
Jonathan Wakely

Created on 2020-07-31.00:00:00 last changed 12 months ago

Messages

Date: 2020-11-09.21:40:50

Proposed resolution:

This wording is relative to N4861.

  1. Modify [format.args] as indicated:

    -1- An instance of basic_format_args provides access to formatting arguments. Implementations should optimize the representation of basic_format_args for a small number of formatting arguments. [Note: For example, by storing indices of type alternatives separately from values and packing the former. — end note]

    basic_format_args() noexcept;
    

    -2- Effects: Initializes size_ with 0.

    […]
    basic_format_arg<Context> get(size_t i) const noexcept;
    

    -4- Returns: i < size_ ? data_[i] : basic_format_arg<Context>().

    [Note: Implementations are encouraged to optimize the representation of basic_format_args for small number of formatting arguments by storing indices of type alternatives separately from values and packing the former. — end note]

Date: 2020-11-09.00:00:00

[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]

Date: 2020-08-15.00:00:00

[ 2020-08-09; Reflector prioritization ]

Set priority to 0 and status to Tentatively Ready after six votes in favour during reflector discussions.

Date: 2020-07-31.00:00:00

The note in the final paragraph of [format.args] gives encouragement to implementations, which is not allowed in a note.

It needs to be normative text, possibly using "should", or if left as a note could be phrased as "Implementations can optimize the representation […]".

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2020-11-09 21:40:50adminsetmessages: + msg11587
2020-11-09 21:40:50adminsetstatus: ready -> wp
2020-08-09 09:47:13adminsetmessages: + msg11432
2020-08-09 09:47:13adminsetstatus: new -> ready
2020-08-02 18:36:21adminsetmessages: + msg11430
2020-07-31 00:00:00admincreate