Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: third_party/WebKit/Source/wtf/TypeTraitsTest.cpp

Issue 1785653002: WTF TypeTraits: Fix IsTrivially{DefaultConstructible,Destructible}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/TypeTraitsTest.cpp
diff --git a/third_party/WebKit/Source/wtf/TypeTraitsTest.cpp b/third_party/WebKit/Source/wtf/TypeTraitsTest.cpp
index 79fddfcba97cd1be3d60843586d0d982e06de690..165ec0d5c1c1c24f09562906bec8962e49e9d938 100644
--- a/third_party/WebKit/Source/wtf/TypeTraitsTest.cpp
+++ b/third_party/WebKit/Source/wtf/TypeTraitsTest.cpp
@@ -164,6 +164,22 @@ static_assert(IsMoveAssignable<AssignableImplicit>::value, "AssignableImplicit i
#endif // !COMPILER(MSVC) || COMPILER(CLANG)
+class DefaultConstructorDeleted final {
+private:
+ DefaultConstructorDeleted() = delete;
+};
+
+class DestructorDeleted final {
+private:
+ ~DestructorDeleted() = delete;
+};
+
+static_assert(!IsTriviallyDefaultConstructible<DefaultConstructorDeleted>::value,
+ "DefaultConstructorDeleted must not be trivially default constructible.");
+
+static_assert(!IsTriviallyDestructible<DestructorDeleted>::value,
+ "DestructorDeleted must not be trivially destructible.");
+
} // anonymous namespace
} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698