@@ -44,10 +44,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
4444
4545// __pointer
4646template <class _Tp >
47- using __pointer_member = typename _Tp::pointer;
47+ using __pointer_member _LIBCPP_NODEBUG = typename _Tp::pointer;
4848
4949template <class _Tp , class _Alloc >
50- using __pointer = __detected_or_t <_Tp*, __pointer_member, __libcpp_remove_reference_t <_Alloc> >;
50+ using __pointer _LIBCPP_NODEBUG =
51+ __detected_or_t <_Tp *, __pointer_member,
52+ __libcpp_remove_reference_t <_Alloc>>;
5153
5254// __const_pointer
5355_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX (__has_const_pointer, const_pointer);
@@ -58,7 +60,8 @@ struct __const_pointer {
5860template <class _Tp , class _Ptr , class _Alloc >
5961struct __const_pointer <_Tp, _Ptr, _Alloc, false > {
6062#ifdef _LIBCPP_CXX03_LANG
61- using type = typename pointer_traits<_Ptr>::template rebind<const _Tp>::other;
63+ using type _LIBCPP_NODEBUG =
64+ typename pointer_traits<_Ptr>::template rebind<const _Tp>::other;
6265#else
6366 using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const _Tp>;
6467#endif
@@ -96,10 +99,11 @@ struct __const_void_pointer<_Ptr, _Alloc, false> {
9699
97100// __size_type
98101template <class _Tp >
99- using __size_type_member = typename _Tp::size_type;
102+ using __size_type_member _LIBCPP_NODEBUG = typename _Tp::size_type;
100103
101104template <class _Alloc , class _DiffType >
102- using __size_type = __detected_or_t <__make_unsigned_t <_DiffType>, __size_type_member, _Alloc>;
105+ using __size_type _LIBCPP_NODEBUG =
106+ __detected_or_t <__make_unsigned_t <_DiffType>, __size_type_member, _Alloc>;
103107
104108// __alloc_traits_difference_type
105109_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX (__has_alloc_traits_difference_type, difference_type);
@@ -114,33 +118,41 @@ struct __alloc_traits_difference_type<_Alloc, _Ptr, true> {
114118
115119// __propagate_on_container_copy_assignment
116120template <class _Tp >
117- using __propagate_on_container_copy_assignment_member = typename _Tp::propagate_on_container_copy_assignment;
121+ using __propagate_on_container_copy_assignment_member _LIBCPP_NODEBUG =
122+ typename _Tp::propagate_on_container_copy_assignment;
118123
119124template <class _Alloc >
120- using __propagate_on_container_copy_assignment =
121- __detected_or_t <false_type, __propagate_on_container_copy_assignment_member, _Alloc>;
125+ using __propagate_on_container_copy_assignment _LIBCPP_NODEBUG =
126+ __detected_or_t <false_type, __propagate_on_container_copy_assignment_member,
127+ _Alloc>;
122128
123129// __propagate_on_container_move_assignment
124130template <class _Tp >
125- using __propagate_on_container_move_assignment_member = typename _Tp::propagate_on_container_move_assignment;
131+ using __propagate_on_container_move_assignment_member _LIBCPP_NODEBUG =
132+ typename _Tp::propagate_on_container_move_assignment;
126133
127134template <class _Alloc >
128- using __propagate_on_container_move_assignment =
129- __detected_or_t <false_type, __propagate_on_container_move_assignment_member, _Alloc>;
135+ using __propagate_on_container_move_assignment _LIBCPP_NODEBUG =
136+ __detected_or_t <false_type, __propagate_on_container_move_assignment_member,
137+ _Alloc>;
130138
131139// __propagate_on_container_swap
132140template <class _Tp >
133- using __propagate_on_container_swap_member = typename _Tp::propagate_on_container_swap;
141+ using __propagate_on_container_swap_member _LIBCPP_NODEBUG =
142+ typename _Tp::propagate_on_container_swap;
134143
135144template <class _Alloc >
136- using __propagate_on_container_swap = __detected_or_t <false_type, __propagate_on_container_swap_member, _Alloc>;
145+ using __propagate_on_container_swap _LIBCPP_NODEBUG =
146+ __detected_or_t <false_type, __propagate_on_container_swap_member, _Alloc>;
137147
138148// __is_always_equal
139149template <class _Tp >
140- using __is_always_equal_member = typename _Tp::is_always_equal;
150+ using __is_always_equal_member _LIBCPP_NODEBUG = typename _Tp::is_always_equal;
141151
142152template <class _Alloc >
143- using __is_always_equal = __detected_or_t <typename is_empty<_Alloc>::type, __is_always_equal_member, _Alloc>;
153+ using __is_always_equal _LIBCPP_NODEBUG =
154+ __detected_or_t <typename is_empty<_Alloc>::type, __is_always_equal_member,
155+ _Alloc>;
144156
145157// __allocator_traits_rebind
146158_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -165,7 +177,8 @@ struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> {
165177_LIBCPP_SUPPRESS_DEPRECATED_POP
166178
167179template <class _Alloc , class _Tp >
168- using __allocator_traits_rebind_t = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
180+ using __allocator_traits_rebind_t _LIBCPP_NODEBUG =
181+ typename __allocator_traits_rebind<_Alloc, _Tp>::type;
169182
170183_LIBCPP_SUPPRESS_DEPRECATED_PUSH
171184
@@ -232,32 +245,43 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(allocation_result);
232245
233246template <class _Alloc >
234247struct _LIBCPP_TEMPLATE_VIS allocator_traits {
235- using allocator_type = _Alloc;
236- using value_type = typename allocator_type::value_type;
237- using pointer = __pointer<value_type, allocator_type>;
238- using const_pointer = typename __const_pointer<value_type, pointer, allocator_type>::type;
239- using void_pointer = typename __void_pointer<pointer, allocator_type>::type;
240- using const_void_pointer = typename __const_void_pointer<pointer, allocator_type>::type;
241- using difference_type = typename __alloc_traits_difference_type<allocator_type, pointer>::type;
242- using size_type = __size_type<allocator_type, difference_type>;
243- using propagate_on_container_copy_assignment = __propagate_on_container_copy_assignment<allocator_type>;
244- using propagate_on_container_move_assignment = __propagate_on_container_move_assignment<allocator_type>;
245- using propagate_on_container_swap = __propagate_on_container_swap<allocator_type>;
246- using is_always_equal = __is_always_equal<allocator_type>;
248+ using allocator_type _LIBCPP_NODEBUG = _Alloc;
249+ using value_type _LIBCPP_NODEBUG = typename allocator_type::value_type;
250+ using pointer _LIBCPP_NODEBUG = __pointer<value_type, allocator_type>;
251+ using const_pointer _LIBCPP_NODEBUG =
252+ typename __const_pointer<value_type, pointer, allocator_type>::type;
253+ using void_pointer _LIBCPP_NODEBUG =
254+ typename __void_pointer<pointer, allocator_type>::type;
255+ using const_void_pointer _LIBCPP_NODEBUG =
256+ typename __const_void_pointer<pointer, allocator_type>::type;
257+ using difference_type _LIBCPP_NODEBUG =
258+ typename __alloc_traits_difference_type<allocator_type, pointer>::type;
259+ using size_type _LIBCPP_NODEBUG =
260+ __size_type<allocator_type, difference_type>;
261+ using propagate_on_container_copy_assignment _LIBCPP_NODEBUG =
262+ __propagate_on_container_copy_assignment<allocator_type>;
263+ using propagate_on_container_move_assignment _LIBCPP_NODEBUG =
264+ __propagate_on_container_move_assignment<allocator_type>;
265+ using propagate_on_container_swap _LIBCPP_NODEBUG =
266+ __propagate_on_container_swap<allocator_type>;
267+ using is_always_equal _LIBCPP_NODEBUG = __is_always_equal<allocator_type>;
247268
248269#ifndef _LIBCPP_CXX03_LANG
249270 template <class _Tp >
250- using rebind_alloc = __allocator_traits_rebind_t <allocator_type, _Tp>;
271+ using rebind_alloc _LIBCPP_NODEBUG =
272+ __allocator_traits_rebind_t <allocator_type, _Tp>;
251273 template <class _Tp >
252- using rebind_traits = allocator_traits<rebind_alloc<_Tp> >;
274+ using rebind_traits _LIBCPP_NODEBUG = allocator_traits<rebind_alloc<_Tp>>;
253275#else // _LIBCPP_CXX03_LANG
254276 template <class _Tp >
255277 struct rebind_alloc {
256- using other = __allocator_traits_rebind_t <allocator_type, _Tp>;
278+ using other _LIBCPP_NODEBUG =
279+ __allocator_traits_rebind_t <allocator_type, _Tp>;
257280 };
258281 template <class _Tp >
259282 struct rebind_traits {
260- using other = allocator_traits<typename rebind_alloc<_Tp>::other>;
283+ using other _LIBCPP_NODEBUG =
284+ allocator_traits<typename rebind_alloc<_Tp>::other>;
261285 };
262286#endif // _LIBCPP_CXX03_LANG
263287
@@ -355,12 +379,13 @@ template <class _Traits, class _Tp>
355379using __rebind_alloc _LIBCPP_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
356380#else
357381template <class _Traits , class _Tp >
358- using __rebind_alloc = typename _Traits::template rebind_alloc<_Tp>::other;
382+ using __rebind_alloc _LIBCPP_NODEBUG =
383+ typename _Traits::template rebind_alloc<_Tp>::other;
359384#endif
360385
361386template <class _Alloc >
362387struct __check_valid_allocator : true_type {
363- using _Traits = std::allocator_traits<_Alloc>;
388+ using _Traits _LIBCPP_NODEBUG = std::allocator_traits<_Alloc>;
364389 static_assert (is_same<_Alloc, __rebind_alloc<_Traits, typename _Traits::value_type> >::value,
365390 " [allocator.requirements] states that rebinding an allocator to the same type should result in the "
366391 " original allocator" );
0 commit comments