56 #ifndef _STL_CONSTRUCT_H
57 #define _STL_CONSTRUCT_H 1
63 namespace std _GLIBCXX_VISIBILITY(default)
65 _GLIBCXX_BEGIN_NAMESPACE_VERSION
71 #if __cplusplus >= 201103L
72 template<
typename _T1,
typename... _Args>
75 { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
77 template<
typename _T1,
typename _T2>
83 ::new(static_cast<void*>(__p)) _T1(__value);
90 template<
typename _Tp>
93 { __pointer->~_Tp(); }
98 template<
typename _ForwardIterator>
100 __destroy(_ForwardIterator __first, _ForwardIterator __last)
102 for (; __first != __last; ++__first)
108 struct _Destroy_aux<true>
110 template<
typename _ForwardIterator>
112 __destroy(_ForwardIterator, _ForwardIterator) { }
120 template<
typename _ForwardIterator>
122 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
124 typedef typename iterator_traits<_ForwardIterator>::value_type
126 std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
127 __destroy(__first, __last);
136 template<
typename _ForwardIterator,
typename _Allocator>
138 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
142 for (; __first != __last; ++__first)
146 template<
typename _ForwardIterator,
typename _Tp>
148 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
154 _GLIBCXX_END_NAMESPACE_VERSION
Uniform interface to C++98 and C++0x allocators.
void _Construct(_T1 *__p, _Args &&...__args)
void _Destroy(_Tp *__pointer)
_Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.