Bug 247607

Summary: Replace std::remove_cvref with std::decay where appropriate
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: darin, fujii.hironori, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=247542

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
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
Note You need to log in before you can comment on or make changes to this bug.