summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorCasey Carter <Casey@Carter.net>2019-10-10 18:07:12 +0000
committerCasey Carter <Casey@Carter.net>2019-10-10 18:07:12 +0000
commitffc83995de6db6ee49fd42c064946dee8d058bb3 (patch)
tree26fafae4afaaa3ec7bdd1249b7a9e792545c7e9d /libcxx/test
parenta121891a553647467a67076c4e0a374c14d50a2c (diff)
downloadbcm5719-llvm-ffc83995de6db6ee49fd42c064946dee8d058bb3.tar.gz
bcm5719-llvm-ffc83995de6db6ee49fd42c064946dee8d058bb3.zip
[libc++][test] Change IsSmallObject's calculation for std::any's small object buffer
`sizeof(std::any) - sizeof(void*)` is correct for both libc++ and the MSVC standard library. Differential Revision: https://reviews.llvm.org/D68756 llvm-svn: 374407
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/support/any_helpers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/support/any_helpers.h b/libcxx/test/support/any_helpers.h
index eb9a4c149fb..099bcec4289 100644
--- a/libcxx/test/support/any_helpers.h
+++ b/libcxx/test/support/any_helpers.h
@@ -26,7 +26,7 @@ namespace std { namespace experimental {} }
template <class T>
struct IsSmallObject
: public std::integral_constant<bool
- , sizeof(T) <= (sizeof(void*)*3)
+ , sizeof(T) <= sizeof(std::any) - sizeof(void*)
&& std::alignment_of<void*>::value
% std::alignment_of<T>::value == 0
&& std::is_nothrow_move_constructible<T>::value
OpenPOWER on IntegriCloud