From 00e59b46f0b673433cb790bbbc74d5c6539b6e07 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 6 Jun 2018 06:42:27 +0000 Subject: [PATCH] Remove unused code from __functional_base. NFC. Patch from Arthur O'Dwyer. `__user_alloc_construct_impl` is used by , but this `__user_alloc_construct` is never used. Also, `` doesn't need a full definition of `std::tuple`; just the forward declaration in `<__tuple>` will suffice. Reviewed as https://reviews.llvm.org/D46806 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@334069 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__functional_base | 10 ---------- include/experimental/memory_resource | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/include/__functional_base b/include/__functional_base index 12af4dc96..1a90bd628 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -646,16 +646,6 @@ void __user_alloc_construct_impl (integral_constant, _Tp *__storage, con new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a); } -// FIXME: Theis should have a version which takes a non-const alloc. -template -inline _LIBCPP_INLINE_VISIBILITY -void __user_alloc_construct (_Tp *__storage, const _Allocator &__a, _Args &&... __args) -{ - __user_alloc_construct_impl( - __uses_alloc_ctor<_Tp, _Allocator>(), - __storage, __a, _VSTD::forward<_Args>(__args)... - ); -} #endif // _LIBCPP_CXX03_LANG _LIBCPP_END_NAMESPACE_STD diff --git a/include/experimental/memory_resource b/include/experimental/memory_resource index 748e2e787..221ce5b8e 100644 --- a/include/experimental/memory_resource +++ b/include/experimental/memory_resource @@ -71,7 +71,7 @@ namespace pmr { #include #include #include -#include +#include <__tuple> #include #include #include @@ -96,7 +96,7 @@ size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT } // 8.5, memory.resource -class _LIBCPP_TEMPLATE_VIS memory_resource +class _LIBCPP_TYPE_VIS memory_resource { static const size_t __max_align = alignof(max_align_t);