Skip to content

Commit dda1e44

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@374407 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 193f188 commit dda1e44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/support/any_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace std { namespace experimental {} }
2626
template <class T>
2727
struct IsSmallObject
2828
: public std::integral_constant<bool
29-
, sizeof(T) <= (sizeof(void*)*3)
29+
, sizeof(T) <= sizeof(std::any) - sizeof(void*)
3030
&& std::alignment_of<void*>::value
3131
% std::alignment_of<T>::value == 0
3232
&& std::is_nothrow_move_constructible<T>::value

0 commit comments

Comments
 (0)