Thank you for your interest, Liang!
I replied privately regarding WG21 membership requirements and how to submit a proposal. In this response, I'm just discussing the content of the draft proposal.
std::fpos is a class template
parameterized by a State type
parameter that equates to std::mbstate_t
for std::fpos specializations
provided by the standard library. The proposed design omits
formatting for the state object notionally held by a std::fpos value and made accessible via
the state() member function. The
proposal does not explicitly discuss why this choice is made
though an argument can be inferred based on the description of how
the ostream operators support formatting of these types via
(possibly non-conforming?) implicit conversion to std::streamoff. The standard does not
yet provide an input parsing equivalent to std::format()
(though a proposal does exist; see P1729 (Text Parsing)). Should
an input equivalent be added, I would expect it to be possible to
parse formatted output such that an equivalent value is produced.
It might therefore make sense for the std::fpos
formatter to at least support formatting of the state value as
well (either by default or perhaps via an option in the format
string). I would like to see the proposal updated to
discuss/address support for the associated state value. In
general, discarding data should be done explicitly, so an argument
to do so implicitly should be present and compelling.
Tom.
Hi,
I'm Liang Jiaming. Recently I've floated my idea in std-proposal mailing list for adding formatter for fpos (see ISOCPP std-proposals List: [std-proposals] Adding formatter for std::fpos), the type typically returned by `tellg/p` of C++ streams. After multiple rounds of discussions with Authur O'Dwyer and Victor Zverorich, I've finished my proposal design and wording (see ISOCPP std-proposals List: Re: [std-proposals] P3070 and formatter<fpos>, was Re: Proposal draft for adding formatter for fpos). The proposal draft is uploaded to PXXXXR0: Adding formatter for fpos (extra-creativity.github.io).
This is the first time I draft a proposal, so I'm not quite familiar with the related procedures even after reading How To Submit a Proposal : Standard C++ (isocpp.org). It seems that before presenting the proposal to LEWG, I need to present it first to SG16 and the paper needs to be assigned with an official proposal number. But I'm not quite sure what I should really do next, so I send a mail to SG16 mailing list. Any help would be appreciated :-)
Thank you all in advance!
Liang Jiaming