CaseyCarter created this revision. CaseyCarter added reviewers: mclow.lists, EricWF, ldionne. CaseyCarter added a project: libc++. Herald added subscribers: libcxx-commits, dexonsmith, christof.
`sizeof(std::any) - sizeof(void*)` is correct for both libc++ and the MSVC standard library. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68756 Files: libcxx/test/support/any_helpers.h Index: libcxx/test/support/any_helpers.h =================================================================== --- libcxx/test/support/any_helpers.h +++ libcxx/test/support/any_helpers.h @@ -26,13 +26,13 @@ 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 > {}; template <class T> bool containsType(std::any const& a) { #if !defined(TEST_HAS_NO_RTTI)
Index: libcxx/test/support/any_helpers.h =================================================================== --- libcxx/test/support/any_helpers.h +++ libcxx/test/support/any_helpers.h @@ -26,13 +26,13 @@ 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 > {}; template <class T> bool containsType(std::any const& a) { #if !defined(TEST_HAS_NO_RTTI)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits