[PATCH] D25449: Disable trivial pair copy/move tests when unsupported
Dimitry Andric via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 13:29:42 PDT 2016
dim created this revision.
dim added reviewers: EricWF, emaste, rsmith, theraven.
dim added a subscriber: cfe-commits.
On FreeBSD, for ABI compatibility reasons, the pair trivial copy
constructor is disabled, using the aptly-named
`_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR` define.
Disable the related tests when this define is on, so they don't fail
unexpectedly.
https://reviews.llvm.org/D25449
Files:
test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
Index: test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
===================================================================
--- test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
+++ test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
@@ -32,19 +32,25 @@
typedef std::pair<int, short> P;
{
static_assert(std::is_copy_constructible<P>::value, "");
+#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_copy_constructible<P>::value, "");
+#endif
}
#if TEST_STD_VER >= 11
{
static_assert(std::is_move_constructible<P>::value, "");
+#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_move_constructible<P>::value, "");
+#endif
}
{
using P1 = std::pair<Dummy, int>;
static_assert(!std::is_copy_constructible<P1>::value, "");
static_assert(!std::is_trivially_copy_constructible<P1>::value, "");
static_assert(std::is_move_constructible<P1>::value, "");
+#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
static_assert(std::is_trivially_move_constructible<P1>::value, "");
+#endif
}
#endif
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25449.74167.patch
Type: text/x-patch
Size: 1279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161010/7914beab/attachment.bin>
More information about the cfe-commits
mailing list