-
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
Implement LWG-3631 basic_format_arg(T&&)
should use remove_cvref_t<T>
throughout
#3745
Conversation
Also make formerly exposition only constructors private. Add test coverage for construction of `handle` and inaccessibility of exposition only constructor(s).
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.
This changes behavior pretty radically in the case of stuff that has conversions to one of the types supported "natively" by basic_format_arg, I actually like the change but just want to note that potentially breaking change. It's probably good though, since now such types can get formatted by their own formatter.
Requesting only the change to inline _Qual_for_handle
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.
This changes behavior pretty radically in the case of stuff that has conversions to one of the types supported "natively" by basic_format_arg, I actually like the change but just want to note that potentially breaking change. It's probably good though, since now such types can get formatted by their own formatter.
Requesting only the change to inline _Qual_for_handle
Inlining `_Qual_for_handle`.
Thanks! FYI @barcharcraz I pushed trivial changes after you approved. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for improving the usability of |
Also make formerly exposition only constructors private. As a result, several class templates are forward declared.
Add test coverage for construction of
handle
and inaccessibility of exposition only constructor(s). Note that construction ofhandle
from a const rvalue is still possible since aconst T
rvalue can be bound toconst T&
.Per @cpplearner's discovery on Discord, I decided to ensure that
TQ
(_Qual_for_handle<_Ty>
_Tq
in this PR) never drops const-qualifier fromT
(_Ty
).Fixes #3460.