58 #ifndef _STL_CONSTRUCT_H
59 #define _STL_CONSTRUCT_H 1
64 namespace std _GLIBCXX_VISIBILITY(default)
66 _GLIBCXX_BEGIN_NAMESPACE_VERSION
72 #ifdef __GXX_EXPERIMENTAL_CXX0X__
73 template<
typename _T1,
typename... _Args>
76 { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
78 template<
typename _T1,
typename _T2>
84 ::new(static_cast<void*>(__p)) _T1(__value);
91 template<
typename _Tp>
94 { __pointer->~_Tp(); }
99 template<
typename _ForwardIterator>
101 __destroy(_ForwardIterator __first, _ForwardIterator __last)
103 for (; __first != __last; ++__first)
109 struct _Destroy_aux<true>
111 template<
typename _ForwardIterator>
113 __destroy(_ForwardIterator, _ForwardIterator) { }
121 template<
typename _ForwardIterator>
123 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
125 typedef typename iterator_traits<_ForwardIterator>::value_type
127 std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
128 __destroy(__first, __last);
137 template <
typename _Tp>
class allocator;
139 template<
typename _ForwardIterator,
typename _Allocator>
141 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
144 for (; __first != __last; ++__first)
145 __alloc.destroy(std::__addressof(*__first));
148 template<
typename _ForwardIterator,
typename _Tp>
150 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
156 _GLIBCXX_END_NAMESPACE_VERSION
void _Destroy(_Tp *__pointer)
void _Construct(_T1 *__p, _Args &&...__args)