LWG-3554 Add const charT* overloads for chrono::parse - #2261
LWG-3554 Add const charT* overloads for chrono::parse#2261Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
const charT* overloads for chrono::parse#2261Conversation
| }; | ||
|
|
||
| template <class _CharT, class _Traits, class _Alloc, class _Parsable> | ||
| struct _Time_parse_iomanip { |
There was a problem hiding this comment.
Maybe a // TRANSITION, ABI comment to the effect that this can be replaced with _Time_parse_iomanip_c_str in the future?
Edit: this is showing more context than I intended. I was referring specifically to the struct _Time_parse_iomanip { line.
There was a problem hiding this comment.
The small code duplication is not bad enough to worry me, personally. Storing a reference to basic_string also has a tiny benefit, that is the format string is not invalidated if the basic_string is resized after the call to parse.
There was a problem hiding this comment.
I don't think the manipulator is supposed to live long enought for the format string to be resized, but fair enough regarding the amount of code duplication.
Co-authored-by: Casey Carter <cartec69@gmail.com>
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for implementing this LWG issue resolution in a timely manner! 😹 ⌚ 🎉 |
Implements LWG-3554 "
chrono::parseneedsconst charT*andbasic_string_view<charT>overloads" (despite the title, LWG-3554 does not addbasic_string_viewoverloads).Fixes #1928