WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234368
Support passing an old-style enum to add(Hasher&, ...)
https://bugs.webkit.org/show_bug.cgi?id=234368
Summary
Support passing an old-style enum to add(Hasher&, ...)
Chris Dumez
Reported
2021-12-15 15:22:18 PST
Support passing an old-style enum to add(Hasher&, ...). Currently, it works for enum classes but leads to ambiguity errors with some compiler when passing a plain enum: /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/Sources/WebKit/Source/WebCore/platform/network/ProtectionSpaceHash.h:40:9: error: call to 'add' is ambiguous add(hasher, protectionSpace.serverType()); In file included from /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/BuildRecords/WebCore_install/Symbols/BuiltProducts/DerivedSources/WebCore/unified-sources/UnifiedSource43-mm.mm:5: In file included from ./platform/network/mac/CookieStorageMac.mm:30: In file included from /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/Sources/WebKit/Source/WebCore/platform/network/NetworkStorageSession.h:28: In file included from /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/Sources/WebKit/Source/WebCore/platform/network/CredentialStorage.h:29: In file included from /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/Sources/WebKit/Source/WebCore/platform/network/ProtectionSpaceHash.h:30: /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/SDKs/MacOSX11.5.Internal.sdk/usr/local/include/wtf/Hasher.h:34:148: note: candidate function [with UnsignedInteger = WebCore::ProtectionSpaceServerType] template<typename UnsignedInteger> std::enable_if_t<std::is_unsigned<UnsignedInteger>::value && sizeof(UnsignedInteger) <= sizeof(uint32_t), void> add(Hasher&, UnsignedInteger); /Volumes/Data/worker/production-archive/build/build-Production/MacOSX.platform/WebKit_OpenSource.roots/SDKs/MacOSX11.5.Internal.sdk/usr/local/include/wtf/Hasher.h:126:89: note: candidate function [with Enumeration = WebCore::ProtectionSpaceServerType] template<typename Enumeration> std::enable_if_t<std::is_enum<Enumeration>::value, void> add(Hasher& hasher, Enumeration value)
Attachments
Patch
(4.48 KB, patch)
2021-12-15 15:29 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-12-15 15:29:02 PST
Created
attachment 447290
[details]
Patch
EWS
Comment 2
2021-12-15 17:19:22 PST
Committed
r287120
(
245304@main
): <
https://commits.webkit.org/245304@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 447290
[details]
.
Radar WebKit Bug Importer
Comment 3
2021-12-15 17:20:17 PST
<
rdar://problem/86550827
>
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