Title: [265265] trunk/Source/WTF
- Revision
- 265265
- Author
- hironori.fu...@sony.com
- Date
- 2020-08-04 15:54:08 -0700 (Tue, 04 Aug 2020)
Log Message
[MSVC] wtf/Optional.h: error C2280: 'WTF::constexpr_storage_t<T> &WTF::constexpr_storage_t<T>::operator =(const WTF::constexpr_storage_t<T> &)': attempting to reference a deleted function
https://bugs.webkit.org/show_bug.cgi?id=215003
Reviewed by Yusuke Suzuki.
Microsoft reported the upcoming MSVC can't compile
Optional<std::pair<JSC::SamplingProfiler::StackFrame::CodeLocation,JSC::CodeBlock *>>.
> wtf/Optional.h(419,39): error C2280: 'WTF::constexpr_storage_t<T> &WTF::constexpr_storage_t<T>::operator =(const WTF::constexpr_storage_t<T> &)': attempting to reference a deleted function
They suggests using std::is_trivially_copy_assignable_v in
Optional ctor instead of std::is_trivially_copyable_v.
* wtf/Optional.h:
(WTF::Optional::Optional): Replaced std::is_trivially_copyable_v with std::is_trivially_copy_assignable_v.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (265264 => 265265)
--- trunk/Source/WTF/ChangeLog 2020-08-04 22:49:38 UTC (rev 265264)
+++ trunk/Source/WTF/ChangeLog 2020-08-04 22:54:08 UTC (rev 265265)
@@ -1,3 +1,21 @@
+2020-08-04 Fujii Hironori <hironori.fu...@sony.com>
+
+ [MSVC] wtf/Optional.h: error C2280: 'WTF::constexpr_storage_t<T> &WTF::constexpr_storage_t<T>::operator =(const WTF::constexpr_storage_t<T> &)': attempting to reference a deleted function
+ https://bugs.webkit.org/show_bug.cgi?id=215003
+
+ Reviewed by Yusuke Suzuki.
+
+ Microsoft reported the upcoming MSVC can't compile
+ Optional<std::pair<JSC::SamplingProfiler::StackFrame::CodeLocation,JSC::CodeBlock *>>.
+
+ > wtf/Optional.h(419,39): error C2280: 'WTF::constexpr_storage_t<T> &WTF::constexpr_storage_t<T>::operator =(const WTF::constexpr_storage_t<T> &)': attempting to reference a deleted function
+
+ They suggests using std::is_trivially_copy_assignable_v in
+ Optional ctor instead of std::is_trivially_copyable_v.
+
+ * wtf/Optional.h:
+ (WTF::Optional::Optional): Replaced std::is_trivially_copyable_v with std::is_trivially_copy_assignable_v.
+
2020-08-04 Alex Christensen <achristen...@webkit.org>
about: scheme URL constants should be backed by StaticStringImpl
Modified: trunk/Source/WTF/wtf/Optional.h (265264 => 265265)
--- trunk/Source/WTF/wtf/Optional.h 2020-08-04 22:49:38 UTC (rev 265264)
+++ trunk/Source/WTF/wtf/Optional.h 2020-08-04 22:54:08 UTC (rev 265265)
@@ -415,7 +415,7 @@
: OptionalBase<T>()
{
if (rhs.initialized()) {
- if constexpr (std::is_trivially_copyable_v<T>)
+ if constexpr (std::is_trivially_copy_assignable_v<T>)
OptionalBase<T>::storage_ = *rhs;
else
::new (static_cast<void*>(dataptr())) T(*rhs);
@@ -427,7 +427,7 @@
: OptionalBase<T>()
{
if (rhs.initialized()) {
- if constexpr (std::is_trivially_copyable_v<T>)
+ if constexpr (std::is_trivially_copy_assignable_v<T>)
OptionalBase<T>::storage_ = *rhs;
else
::new (static_cast<void*>(dataptr())) T(std::move(*rhs));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes