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.
parsemanipulator without abbreviation is not callable
Section: 29.13 [time.parse] Status: C++20 Submitter: Tomasz Kamiński Opened: 2019-07-10 Last modified: 2021-02-25
View all other issues in [time.parse].
View all issues with C++20 status.
parse overload that does not accept the abbreviation but does accept an offset,
because the expression in the Remarks: clause:
from_stream(declval<basic_istream<charT, traits>*>(), fmt.c_str(), tp, nullptr, &offset)
is not valid. This is caused by deduction failure for the basic_string<charT, traits, Alloc>*
nullptr (see this link):
[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
This wording is relative to N4830.
[Drafting note: As a drive-by fix the Remarks element is also converted to a Constraints element.]
Modify 29.13 [time.parse] as indicated:
template<class charT, class traits, class Alloc, class Parsable> unspecified parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp, minutes& offset);
Remarks: This function shall not participate in overload resolution unlessfrom_stream(declval<basic_istream<charT, traits>&>(), fmt.c_str(), tp, nullptr, &offset)
is-7- Returns: A manipulator that, when extracted from a basic_istream<charT, traits> is, calls from_stream(is, fmt.c_str(), tp, nullptr, &offset).
a valid expression.