56#ifndef _STL_CONSTRUCT_H
57#define _STL_CONSTRUCT_H 1
63namespace std _GLIBCXX_VISIBILITY(default)
65_GLIBCXX_BEGIN_NAMESPACE_VERSION
71#if __cplusplus >= 201103L
72 template<
typename _T1,
typename... _Args>
77 template<
typename _T1,
typename _T2>
79 _Construct(_T1* __p,
const _T2& __value)
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>
124 typedef typename iterator_traits<_ForwardIterator>::value_type
127 __destroy(__first, __last);
136 template<
typename _ForwardIterator,
typename _Allocator>
142 for (; __first != __last; ++__first)
146 template<
typename _ForwardIterator,
typename _Tp>
148 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
151 _Destroy(__first, __last);
154_GLIBCXX_END_NAMESPACE_VERSION
_Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
ISO C++ entities toplevel namespace is std.
void _Destroy(_Tp *__pointer)
void _Construct(_T1 *__p, _Args &&... __args)
Uniform interface to C++98 and C++11 allocators.