[libcxx] r334069 - Remove unused code from __functional_base. NFC.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 5 23:42:28 PDT 2018
Author: ericwf
Date: Tue Jun 5 23:42:27 2018
New Revision: 334069
URL: http://llvm.org/viewvc/llvm-project?rev=334069&view=rev
Log:
Remove unused code from __functional_base. NFC.
Patch from Arthur O'Dwyer.
`__user_alloc_construct_impl` is used by <experimental/memory_resource>, but
this `__user_alloc_construct` is never used.
Also, `<experimental/memory_resource>` doesn't need a full definition of
`std::tuple`; just the forward declaration in `<__tuple>` will suffice.
Reviewed as https://reviews.llvm.org/D46806
Modified:
libcxx/trunk/include/__functional_base
libcxx/trunk/include/experimental/memory_resource
Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=334069&r1=334068&r2=334069&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Tue Jun 5 23:42:27 2018
@@ -646,16 +646,6 @@ void __user_alloc_construct_impl (integr
new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
}
-// FIXME: Theis should have a version which takes a non-const alloc.
-template <class _Tp, class _Allocator, class... _Args>
-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
Modified: libcxx/trunk/include/experimental/memory_resource
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/memory_resource?rev=334069&r1=334068&r2=334069&view=diff
==============================================================================
--- libcxx/trunk/include/experimental/memory_resource (original)
+++ libcxx/trunk/include/experimental/memory_resource Tue Jun 5 23:42:27 2018
@@ -71,7 +71,7 @@ namespace pmr {
#include <memory>
#include <new>
#include <stdexcept>
-#include <tuple>
+#include <__tuple>
#include <type_traits>
#include <utility>
#include <cstddef>
@@ -96,7 +96,7 @@ size_t __aligned_allocation_size(size_t
}
// 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);
More information about the cfe-commits
mailing list