Title: [284566] trunk/Source/WebCore
- Revision
- 284566
- Author
- hironori.fu...@sony.com
- Date
- 2021-10-20 14:07:20 -0700 (Wed, 20 Oct 2021)
Log Message
The code decoding std::optional<ImagePaintingOptions> can't be compiled by PlayStation due to the ImagePaintingOptions template constructor
https://bugs.webkit.org/show_bug.cgi?id=231980
Reviewed by Ross Kirsling.
PlayStation clang can't compile the following code.
> std::optional<ImagePaintingOptions> val;
> decoder >> val;
It reports the following error.
> include\type_traits:3825:31: error: no member named 'value' in 'std::is_convertible<optional<WebCore::ImagePaintingOptions> &, WebCore::ImagePaintingOptions>'
* platform/graphics/ImagePaintingOptions.h:
(WebCore::ImagePaintingOptions::ImagePaintingOptions): Use SFINAE
for the first template constructor not to conflict with the second
one.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (284565 => 284566)
--- trunk/Source/WebCore/ChangeLog 2021-10-20 20:57:36 UTC (rev 284565)
+++ trunk/Source/WebCore/ChangeLog 2021-10-20 21:07:20 UTC (rev 284566)
@@ -1,3 +1,22 @@
+2021-10-20 Fujii Hironori <hironori.fu...@sony.com>
+
+ The code decoding std::optional<ImagePaintingOptions> can't be compiled by PlayStation due to the ImagePaintingOptions template constructor
+ https://bugs.webkit.org/show_bug.cgi?id=231980
+
+ Reviewed by Ross Kirsling.
+
+ PlayStation clang can't compile the following code.
+ > std::optional<ImagePaintingOptions> val;
+ > decoder >> val;
+
+ It reports the following error.
+ > include\type_traits:3825:31: error: no member named 'value' in 'std::is_convertible<optional<WebCore::ImagePaintingOptions> &, WebCore::ImagePaintingOptions>'
+
+ * platform/graphics/ImagePaintingOptions.h:
+ (WebCore::ImagePaintingOptions::ImagePaintingOptions): Use SFINAE
+ for the first template constructor not to conflict with the second
+ one.
+
2021-10-20 Sihui Liu <sihui_...@apple.com>
Remove useless definition from IDBDatabase.idl
Modified: trunk/Source/WebCore/platform/graphics/ImagePaintingOptions.h (284565 => 284566)
--- trunk/Source/WebCore/platform/graphics/ImagePaintingOptions.h 2021-10-20 20:57:36 UTC (rev 284565)
+++ trunk/Source/WebCore/platform/graphics/ImagePaintingOptions.h 2021-10-20 21:07:20 UTC (rev 284566)
@@ -32,10 +32,10 @@
namespace WebCore {
struct ImagePaintingOptions {
- template<typename... Options>
- ImagePaintingOptions(Options... options)
+ template<typename First, typename... Rest, typename = std::enable_if_t<!std::is_same_v<std::decay_t<First>, ImagePaintingOptions>>>
+ ImagePaintingOptions(First first, Rest... rest)
{
- setOption(options...);
+ setOption(first, rest...);
}
template<typename... Overrides>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes