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).
barcharcraz
left a comment
There was a problem hiding this comment.
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
barcharcraz
left a comment
There was a problem hiding this comment.
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
handleand inaccessibility of exposition only constructor(s). Note that construction ofhandlefrom a const rvalue is still possible since aconst Trvalue can be bound toconst T&.Per @cpplearner's discovery on Discord, I decided to ensure that
TQ(_Qual_for_handle<_Ty>_Tqin this PR) never drops const-qualifier fromT(_Ty).Fixes #3460.