58 #ifndef _STL_CONSTRUCT_H
59 #define _STL_CONSTRUCT_H 1
65 namespace std _GLIBCXX_VISIBILITY(default)
67 _GLIBCXX_BEGIN_NAMESPACE_VERSION
73 #ifdef __GXX_EXPERIMENTAL_CXX0X__
74 template<
typename _T1,
typename... _Args>
77 { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
79 template<
typename _T1,
typename _T2>
85 ::new(static_cast<void*>(__p)) _T1(__value);
92 template<
typename _Tp>
95 { __pointer->~_Tp(); }
100 template<
typename _ForwardIterator>
102 __destroy(_ForwardIterator __first, _ForwardIterator __last)
104 for (; __first != __last; ++__first)
110 struct _Destroy_aux<true>
112 template<
typename _ForwardIterator>
114 __destroy(_ForwardIterator, _ForwardIterator) { }
122 template<
typename _ForwardIterator>
124 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
126 typedef typename iterator_traits<_ForwardIterator>::value_type
128 std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
129 __destroy(__first, __last);
138 template <
typename _Tp>
class allocator;
140 template<
typename _ForwardIterator,
typename _Allocator>
142 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
146 for (; __first != __last; ++__first)
150 template<
typename _ForwardIterator,
typename _Tp>
152 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
158 _GLIBCXX_END_NAMESPACE_VERSION
Uniform interface to C++98 and C++0x allocators.
void _Destroy(_Tp *__pointer)
void _Construct(_T1 *__p, _Args &&...__args)
_Tp * __addressof(_Tp &__r) _GLIBCXX_NOEXCEPT
Same as C++11 std::addressof.