Title: [208713] trunk/Source/WTF
- Revision
- 208713
- Author
- [email protected]
- Date
- 2016-11-14 16:10:23 -0800 (Mon, 14 Nov 2016)
Log Message
Expected: add missing `inline`
https://bugs.webkit.org/show_bug.cgi?id=164735
Reviewed by Yusuke Suzuki.
Free functions and full template specializations need to be
`inline`, or in a .cpp file, otherwise each .o creates a duplicate
symbol which makes the linker very sad.
* wtf/Expected.h:
(WTF::ExpectedDetail::Throw):
(WTF::makeExpected):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (208712 => 208713)
--- trunk/Source/WTF/ChangeLog 2016-11-14 22:57:12 UTC (rev 208712)
+++ trunk/Source/WTF/ChangeLog 2016-11-15 00:10:23 UTC (rev 208713)
@@ -1,3 +1,18 @@
+2016-11-14 JF Bastien <[email protected]>
+
+ Expected: add missing `inline`
+ https://bugs.webkit.org/show_bug.cgi?id=164735
+
+ Reviewed by Yusuke Suzuki.
+
+ Free functions and full template specializations need to be
+ `inline`, or in a .cpp file, otherwise each .o creates a duplicate
+ symbol which makes the linker very sad.
+
+ * wtf/Expected.h:
+ (WTF::ExpectedDetail::Throw):
+ (WTF::makeExpected):
+
2016-11-14 Mark Lam <[email protected]>
Build fix after r208690.
Modified: trunk/Source/WTF/wtf/Expected.h (208712 => 208713)
--- trunk/Source/WTF/wtf/Expected.h 2016-11-14 22:57:12 UTC (rev 208712)
+++ trunk/Source/WTF/wtf/Expected.h 2016-11-15 00:10:23 UTC (rev 208713)
@@ -70,7 +70,7 @@
namespace ExpectedDetail {
// Invoked where std::Expected would instead throw.
-NO_RETURN_DUE_TO_CRASH void Throw() { RELEASE_ASSERT_NOT_REACHED(); }
+inline NO_RETURN_DUE_TO_CRASH void Throw() { RELEASE_ASSERT_NOT_REACHED(); }
static constexpr enum class ValueTagType { } ValueTag { };
static constexpr enum class ErrorTagType { } ErrorTag { };
@@ -414,7 +414,7 @@
template <class T, class E, class U> constexpr Expected<T, E> makeExpectedFromError(U&& u) { return Expected<T, E>(makeUnexpected(E { std::forward<U>(u) } )); }
// template <class F, class E = WTF::NulloptTag> constexpr Expected<typename std::result_of<F>::type, E> makeExpected_from_call(F f);
-Expected<void, WTF::NulloptTag> makeExpected() { return Expected<void, WTF::NulloptTag>(); }
+inline Expected<void, WTF::NulloptTag> makeExpected() { return Expected<void, WTF::NulloptTag>(); }
} // namespace WTF
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes