WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
247607
Replace std::remove_cvref with std::decay where appropriate
https://bugs.webkit.org/show_bug.cgi?id=247607
Summary
Replace std::remove_cvref with std::decay where appropriate
Zan Dobersek
Reported
2022-11-08 04:21:22 PST
Bug #247542
placed std::remove_cvref to use where previously std::remove_const/std::remove_cv and std::remove_reference were used together, simply because std::remove_cvref is now available due to C++20 being enforced. In some cases use of std::decay would be more fitting. Besides whittling down reference and constness for a given type, std::decay also converts array and function types to pointer-based types.
https://en.cppreference.com/w/cpp/types/decay
Attachments
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2022-11-08 08:59:06 PST
There are many cases where you could use either std::remove_cvref or std::decay, and personally I slightly prefer using std::decay in those cases, perhaps just because "decay" is a word and "cvref" is not.
Radar WebKit Bug Importer
Comment 2
2022-11-15 04:22:16 PST
<
rdar://problem/102362475
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug