Skip to content

Commit ca2ab4f

Browse files
committedOct 12, 2016
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 llvm-svn: 284047
1 parent e549894 commit ca2ab4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,25 @@ int main()
3232
typedef std::pair<int, short> P;
3333
{
3434
static_assert(std::is_copy_constructible<P>::value, "");
35+
#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
3536
static_assert(std::is_trivially_copy_constructible<P>::value, "");
37+
#endif
3638
}
3739
#if TEST_STD_VER >= 11
3840
{
3941
static_assert(std::is_move_constructible<P>::value, "");
42+
#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
4043
static_assert(std::is_trivially_move_constructible<P>::value, "");
44+
#endif
4145
}
4246
{
4347
using P1 = std::pair<Dummy, int>;
4448
static_assert(!std::is_copy_constructible<P1>::value, "");
4549
static_assert(!std::is_trivially_copy_constructible<P1>::value, "");
4650
static_assert(std::is_move_constructible<P1>::value, "");
51+
#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
4752
static_assert(std::is_trivially_move_constructible<P1>::value, "");
53+
#endif
4854
}
4955
#endif
5056
}

0 commit comments

Comments
 (0)