-
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
Speculatively implement LWG-3636: formatter<T>::format
should be const-qualified
#2573
Conversation
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.
When making changes per non-WP-status lwg issue, you must comment every occurence, mention "per LWG-XXX"
formatter<T>::format
should be const-qualifiedformatter<T>::format
should be const-qualified
Technically, we require commenting behavior that contradicts the Working Draft. All of these If we were to start calling |
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.
Looks good, but the mutable is not good very bad.
Unfortunately we need to just copy _Specs into format before getting the dynamic parameters.
It's not a huge deal as this is only for user-defined types, and if it's a performance problem we can keep the non-const version (assuming wg21 doesn't prohibit that)
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.
LGTM. Added to my "Stuff to port" list.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. (I'll handle verifying that this works with the recent LLVM update.) |
Thanks for time-traveling from the future when this LWG issue has been accepted! ⌚ 😹 ✅ |
Fixes DevCom-1662387