-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LWG-3554 Add const charT*
overloads for chrono::parse
#2261
Conversation
basic_string<_CharT, _Traits, _Alloc>* _Abbrev; | ||
minutes* _Offset; | ||
}; | ||
|
||
template <class _CharT, class _Traits, class _Alloc, class _Parsable> | ||
struct _Time_parse_iomanip { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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::parse
needsconst charT*
andbasic_string_view<charT>
overloads" (despite the title, LWG-3554 does not addbasic_string_view
overloads).Fixes #1928