Date: Wed, 23 Oct 2024 08:06:17 +0800 (GMT+08:00)
Hi Corentin,
The first version of draft (D3374R0) is to format the `fpos` as an integer directly, which can be confirmed by Victor. The reason why I finally add the state type is that Tom reminds me that it's not proper to neglect such a basic component by default and I think that really makes sense. This also makes me reflect that it's possibly not robust for stream to only output the integer, and that's why `.offset` is not thought as the solution. There is no difference for me to cast explicitly or call `.offset`.
In today's talk, I'd like to share something about:
+ briefly cover what mbstate_t should do, as you may be already familiar with;
+ why C++ programmers generally think it's enough to use the integer, as a result of illusion from the implementations of streams that do text encoding;
+ we could provide such facility in the standard library for those programmers who concern the state, as long as we think mbstate_t is not a deprecated feature.
For the formatting specification, there could be some better representations if `(pos, mbstate)` is not considered as a good one or even not the default one, and I'd like to discuss with you :). I know that mbstate_t couldn't be expected to be formatted in any meaning way, but it's enough to make it recoverable by the implementation. For me doing a round-trip is possibly the most thing we could do in the standard.
Thanks for the feedback,
Liang Jiaming
The first version of draft (D3374R0) is to format the `fpos` as an integer directly, which can be confirmed by Victor. The reason why I finally add the state type is that Tom reminds me that it's not proper to neglect such a basic component by default and I think that really makes sense. This also makes me reflect that it's possibly not robust for stream to only output the integer, and that's why `.offset` is not thought as the solution. There is no difference for me to cast explicitly or call `.offset`.
In today's talk, I'd like to share something about:
+ briefly cover what mbstate_t should do, as you may be already familiar with;
+ why C++ programmers generally think it's enough to use the integer, as a result of illusion from the implementations of streams that do text encoding;
+ we could provide such facility in the standard library for those programmers who concern the state, as long as we think mbstate_t is not a deprecated feature.
For the formatting specification, there could be some better representations if `(pos, mbstate)` is not considered as a good one or even not the default one, and I'd like to discuss with you :). I know that mbstate_t couldn't be expected to be formatted in any meaning way, but it's enough to make it recoverable by the implementation. For me doing a round-trip is possibly the most thing we could do in the standard.
Thanks for the feedback,
Liang Jiaming
Received on 2024-10-23 00:06:25