This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

3241. chrono-spec grammar ambiguity in §[time.format]

Section: 29.12 [time.format] Status: C++20 Submitter: Victor Zverovich Opened: 2019-07-24 Last modified: 2021-02-25

Priority: 0

View other active issues in [time.format].

View all other issues in [time.format].

View all issues with C++20 status.

Discussion:

The chrono-spec grammar introduced by P1361R2 "Integration of chrono with text formatting" in section [time.format] is ambiguous because '%' can be interpreted as either literal-char or conversion-spec:

chrono-spec     ::= literal-char | conversion-spec
literal-char    ::= <a character other than '{' or '}'>
conversion-spec ::= '%' [modifier] type

[2019-08-17 Issue Prioritization]

Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.

Proposed resolution:

This wording is relative to N4830.

  1. Modify the literal-char grammar in 29.12 [time.format] as indicated:

    literal-char:
              any character other than {, or }, or %