Title: [237448] trunk/Source/WTF
- Revision
- 237448
- Author
- [email protected]
- Date
- 2018-10-26 01:25:43 -0700 (Fri, 26 Oct 2018)
Log Message
Some internal projects include wtf headers and build with C++11
https://bugs.webkit.org/show_bug.cgi?id=190791
Reviewed by Alexey Proskuryakov.
C++11 doesn't support constexpr functions that contain
statements. This patch removes getLSBSet set from builds before
C++14 to avoid this for now.
* wtf/MathExtras.h:
(getLSBSet):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (237447 => 237448)
--- trunk/Source/WTF/ChangeLog 2018-10-26 07:56:56 UTC (rev 237447)
+++ trunk/Source/WTF/ChangeLog 2018-10-26 08:25:43 UTC (rev 237448)
@@ -1,3 +1,17 @@
+2018-10-26 Keith Miller <[email protected]>
+
+ Some internal projects include wtf headers and build with C++11
+ https://bugs.webkit.org/show_bug.cgi?id=190791
+
+ Reviewed by Alexey Proskuryakov.
+
+ C++11 doesn't support constexpr functions that contain
+ statements. This patch removes getLSBSet set from builds before
+ C++14 to avoid this for now.
+
+ * wtf/MathExtras.h:
+ (getLSBSet):
+
2018-10-25 Ross Kirsling <[email protected]>
Cleanup: inline constexpr is redundant as constexpr implies inline
Modified: trunk/Source/WTF/wtf/MathExtras.h (237447 => 237448)
--- trunk/Source/WTF/wtf/MathExtras.h 2018-10-26 07:56:56 UTC (rev 237447)
+++ trunk/Source/WTF/wtf/MathExtras.h 2018-10-26 08:25:43 UTC (rev 237448)
@@ -206,6 +206,9 @@
return !hasZeroOrOneBitsSet(value);
}
+// FIXME: Some Darwin projects shamelessly include WTF headers and don't build with C++14... See: rdar://problem/45395767
+// Since C++11 and before don't support constexpr statements we can't mark this function constexpr.
+#if !defined(WTF_CPP_STD_VER) || WTF_CPP_STD_VER >= 14
template <typename T> constexpr unsigned getLSBSet(T value)
{
typedef typename std::make_unsigned<T>::type UnsignedT;
@@ -217,6 +220,7 @@
return result;
}
+#endif
template<typename T> inline T divideRoundedUp(T a, T b)
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes