Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 654f0c3862f7bae5bad07b4b451e10c9e9affa35
      
https://github.com/WebKit/WebKit/commit/654f0c3862f7bae5bad07b4b451e10c9e9affa35
  Author: Fujii Hironori <hironori.fu...@sony.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M Source/WTF/wtf/EnumTraits.h

  Log Message:
  -----------
  EnumTraits.h: error: no matching function for call to 'enumName' with Clang 20
https://bugs.webkit.org/show_bug.cgi?id=289669

Reviewed by Keith Miller.

Clang 20 couldn't compile EnumTraits.h.

> wtf/EnumTraits.h:212:33: note: candidate template ignored: invalid 
> explicitly-specified argument for template parameter 'V'

An invalid enum value can't be specifed to the template parameter `V`.

> template<auto V> constexpr std::span<const char> enumName()

The upstream Magic Enum C++ has a template variable 
`is_enum_constexpr_static_cast_valid<E, V>` to check a enum value is valid.
<https://github.com/Neargye/magic_enum/blob/a413fcc9c46a020a746907136a384c227f3cd095/include/magic_enum/magic_enum.hpp#L624-L634>

Imported the template variable.

* Source/WTF/wtf/EnumTraits.h:
(WTF::enumName):
(WTF::makeEnumNames):

Canonical link: https://commits.webkit.org/292321@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to