57 #ifndef _STL_CONSTRUCT_H
58 #define _STL_CONSTRUCT_H 1
62 _GLIBCXX_BEGIN_NAMESPACE(std)
68 template<typename _T1, typename _T2>
74 ::new(static_cast<void*>(__p)) _T1(__value);
80 template<
typename _Tp>
83 { __pointer->~_Tp(); }
88 template<
typename _ForwardIterator>
90 __destroy(_ForwardIterator __first, _ForwardIterator __last)
92 for (; __first != __last; ++__first)
98 struct _Destroy_aux<true>
100 template<
typename _ForwardIterator>
102 __destroy(_ForwardIterator, _ForwardIterator) { }
110 template<
typename _ForwardIterator>
112 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
114 typedef typename iterator_traits<_ForwardIterator>::value_type
116 std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
117 __destroy(__first, __last);
126 template <
typename _Tp>
class allocator;
128 template<
typename _ForwardIterator,
typename _Allocator>
130 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
133 for (; __first != __last; ++__first)
134 __alloc.destroy(&*__first);
137 template<
typename _ForwardIterator,
typename _Tp>
139 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
145 _GLIBCXX_END_NAMESPACE