From fcad66f165a778ee8aeb4ca7a9903b9d9b082df7 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 14 Oct 2019 19:05:04 +0000 Subject: [PATCH] [libc++][test] Portability fix for std::any tests Ensure that `large_tracked_t` defined in `any_helpers.h` is in fact too large to fit in `std::any`'s small object buffer. llvm-svn: 374806 --- libcxx/test/support/any_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/test/support/any_helpers.h b/libcxx/test/support/any_helpers.h index 099bcec..6bdc3fd 100644 --- a/libcxx/test/support/any_helpers.h +++ b/libcxx/test/support/any_helpers.h @@ -414,10 +414,10 @@ struct large_tracked_t { : arg_types(&makeArgumentID, Args...>()) {} TypeID const* arg_types; - int dummy[10]; + int dummy[sizeof(std::any) / sizeof(int) + 1]; }; -static_assert(!IsSmallObject::value, "must be small"); +static_assert(!IsSmallObject::value, "must not be small"); template -- 2.7.4