aboutsummaryrefslogtreecommitdiff
path: root/include/memory
diff options
context:
space:
mode:
Diffstat (limited to 'include/memory')
-rw-r--r--include/memory30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/memory b/include/memory
index 31dc73d8b142..711551d5732d 100644
--- a/include/memory
+++ b/include/memory
@@ -658,12 +658,14 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
# include <atomic>
#endif
-#include <__undef_min_max>
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ValueType>
@@ -1541,7 +1543,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
{return __a.allocate(__n);}
_LIBCPP_INLINE_VISIBILITY
static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint)
- {return allocate(__a, __n, __hint,
+ {return __allocate(__a, __n, __hint,
__has_allocate_hint<allocator_type, size_type, const_void_pointer>());}
_LIBCPP_INLINE_VISIBILITY
@@ -1595,7 +1597,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
_LIBCPP_INLINE_VISIBILITY
static allocator_type
select_on_container_copy_construction(const allocator_type& __a)
- {return select_on_container_copy_construction(
+ {return __select_on_container_copy_construction(
__has_select_on_container_copy_construction<const allocator_type>(),
__a);}
@@ -1694,11 +1696,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
private:
_LIBCPP_INLINE_VISIBILITY
- static pointer allocate(allocator_type& __a, size_type __n,
+ static pointer __allocate(allocator_type& __a, size_type __n,
const_void_pointer __hint, true_type)
{return __a.allocate(__n, __hint);}
_LIBCPP_INLINE_VISIBILITY
- static pointer allocate(allocator_type& __a, size_type __n,
+ static pointer __allocate(allocator_type& __a, size_type __n,
const_void_pointer, false_type)
{return __a.allocate(__n);}
@@ -1735,11 +1737,11 @@ private:
_LIBCPP_INLINE_VISIBILITY
static allocator_type
- select_on_container_copy_construction(true_type, const allocator_type& __a)
+ __select_on_container_copy_construction(true_type, const allocator_type& __a)
{return __a.select_on_container_copy_construction();}
_LIBCPP_INLINE_VISIBILITY
static allocator_type
- select_on_container_copy_construction(false_type, const allocator_type& __a)
+ __select_on_container_copy_construction(false_type, const allocator_type& __a)
{return __a;}
};
@@ -3101,28 +3103,28 @@ struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
struct __destruct_n
{
private:
- size_t size;
+ size_t __size_;
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
- {for (size_t __i = 0; __i < size; ++__i, ++__p) __p->~_Tp();}
+ {for (size_t __i = 0; __i < __size_; ++__i, ++__p) __p->~_Tp();}
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
{}
_LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
- {++size;}
+ {++__size_;}
_LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
{}
_LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
- {size = __s;}
+ {__size_ = __s;}
_LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
{}
public:
_LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
- : size(__s) {}
+ : __size_(__s) {}
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY void __incr(_Tp*) _NOEXCEPT
@@ -5574,4 +5576,6 @@ struct __temp_value {
_LIBCPP_END_NAMESPACE_STD
+_LIBCPP_POP_MACROS
+
#endif // _LIBCPP_MEMORY