Bug 264241 - Remove namespace std overloads of isnan, isinf, and infinite for WTF time types
Summary: Remove namespace std overloads of isnan, isinf, and infinite for WTF time types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gerald Squelart
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-06 00:06 PST by Gerald Squelart
Modified: 2023-11-07 20:02 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Squelart 2023-11-06 00:06:26 PST
Time types under WTF (MonotonicTime, etc.) add overloads of std::isnan, isinf, and isfinite, but it is generally UB to add declarations&definitions to `namespace std`: https://en.cppreference.com/w/cpp/language/extending_std

Instead, these functions should be class member functions, or free functions outside of `std`.
I don't believe these functions are used in generic code, so I think member functions are more appropriate here.
Comment 1 Radar WebKit Bug Importer 2023-11-06 00:06:34 PST
<rdar://problem/117986797>
Comment 2 Gerald Squelart 2023-11-06 00:08:40 PST
Pull request: https://github.com/WebKit/WebKit/pull/20026
Comment 3 EWS 2023-11-07 20:02:03 PST
Committed 270366@main (acfb618b4d5a): <https://commits.webkit.org/270366@main>

Reviewed commits have been landed. Closing PR #20026 and removing active labels.