[PATCH] D68756: [libc++][test] Change IsSmallObject's calculation for std::any's small object buffer

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 11:12:50 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGffc83995de6d: [libc++][test] Change IsSmallObject's calculation for std::any's small object… (authored by CaseyCarter).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68756/new/

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,7 +26,7 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68756.224422.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191010/e66f6c0c/attachment.bin>


More information about the cfe-commits mailing list