Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f073c579307b9ec68d39da3ef4670796dd05894f
      
https://github.com/WebKit/WebKit/commit/f073c579307b9ec68d39da3ef4670796dd05894f
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2024-06-19 (Wed, 19 Jun 2024)

  Changed paths:
    M Source/WTF/wtf/Vector.h
    M Source/WebCore/crypto/cocoa/CryptoKeyOKPCocoa.cpp
    M Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp

  Log Message:
  -----------
  Remove Vector's non-template span constructor
https://bugs.webkit.org/show_bug.cgi?id=275638
rdar://130130388

Reviewed by Sam Weinig.

A std::span can be constructed from a range, so when any compiler is using 
Microsoft's STL
using C++23 and compiles a file that includes IDBKeyData.h, it causes a 
confusing compiler
error because the std::variant implementation checks 
std::is_trivially_move_constructible
on all the types, which tries to instantiate the move constructor of each type, 
which finds
the std::span constructor of Vector that is not a templatized constructor so it 
is not a
substitution error, it is a compiler error.  The constructor was only there to 
help with
constructing Vectors from std::arrays, so instead we just add a template 
constructor that
takes a std::array and makes a std::span from it.  This covers all the uses 
except 2 in
CryptoKeyOKPCocoa.cpp where we were trying to make a Vector from a uint8[32] so 
for those
cases we just explicitly make a std::span and 2 in 
{Audio,Video}EncoderGStreamer.cpp where we need
to explicitly call the std::span constructor to make an optional vector.

I think this is the second to last blocker to us adopting C++23.

* Source/WTF/wtf/Vector.h:
(WTF::Vector::Vector):
* Source/WebCore/crypto/cocoa/CryptoKeyOKPCocoa.cpp:
(WebCore::CryptoKeyOKP::platformGeneratePair):
* Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp:
(WebCore::GStreamerInternalAudioEncoder::GStreamerInternalAudioEncoder):

Canonical link: https://commits.webkit.org/280183@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