[PATCH] D93510: Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 21:36:19 PST 2021
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks good - thanks!
================
Comment at: llvm/unittests/ADT/OptionalTest.cpp:416-420
+// Currently only true on recent MSVC releases.
+static_assert((std::is_trivially_copyable<NonTCopy>::value &&
+ !std::is_trivially_copy_constructible<NonTCopy>::value),
+ "Expect NonTCopy to be trivially copyable, but not trivially "
+ "copy constructible.");
----------------
Probably best to split that into two static_asserts, so it's easier to diagnose failures.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93510/new/
https://reviews.llvm.org/D93510
More information about the llvm-commits
mailing list