[libcxx] r284047 - Disable trivial pair copy/move tests when unsupported
Dimitry Andric via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 13:26:47 PDT 2016
Author: dim
Date: Wed Oct 12 15:26:47 2016
New Revision: 284047
URL: http://llvm.org/viewvc/llvm-project?rev=284047&view=rev
Log:
Disable trivial pair copy/move tests when unsupported
Summary:
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.
Reviewers: emaste, rsmith, theraven, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25449
Modified:
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
Modified: libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp?rev=284047&r1=284046&r2=284047&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp Wed Oct 12 15:26:47 2016
@@ -32,19 +32,25 @@ int main()
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
}
More information about the cfe-commits
mailing list