typedef void value_type;
template<typename _Tp1>
- struct rebind
- { typedef allocator<_Tp1> other; };
+ struct rebind
+ { typedef allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
typedef true_type is_always_equal;
template<typename _Up, typename... _Args>
- void
- construct(_Up* __p, _Args&&... __args)
+ void
+ construct(_Up* __p, _Args&&... __args)
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
template<typename _Up>
- void
- destroy(_Up* __p) { __p->~_Up(); }
+ void
+ destroy(_Up* __p) { __p->~_Up(); }
#endif
};
typedef _Tp value_type;
template<typename _Tp1>
- struct rebind
- { typedef allocator<_Tp1> other; };
+ struct rebind
+ { typedef allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
: __allocator_base<_Tp>(__a) { }
template<typename _Tp1>
- allocator(const allocator<_Tp1>&) throw() { }
+ allocator(const allocator<_Tp1>&) throw() { }
~allocator() throw() { }
* @brief An allocator that uses global new, as per [20.4].
* @ingroup allocators
*
- * This is precisely the allocator defined in the C++ Standard.
+ * This is precisely the allocator defined in the C++ Standard.
* - all allocation calls operator new
* - all deallocation calls operator delete
*
typedef _Tp value_type;
template<typename _Tp1>
- struct rebind
- { typedef new_allocator<_Tp1> other; };
+ struct rebind
+ { typedef new_allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { }
template<typename _Tp1>
- new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
+ new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
~new_allocator() _GLIBCXX_USE_NOEXCEPT { }
// about what the return value is when __n == 0.
pointer
allocate(size_type __n, const void* = 0)
- {
+ {
if (__n > this->max_size())
std::__throw_bad_alloc();
#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
- void
- construct(_Up* __p, _Args&&... __args)
+ void
+ construct(_Up* __p, _Args&&... __args)
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
template<typename _Up>
- void
- destroy(_Up* __p) { __p->~_Up(); }
+ void
+ destroy(_Up* __p) { __p->~_Up(); }
#else
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 402. wrong new expression in [some_] allocator::construct
- void
- construct(pointer __p, const _Tp& __val)
+ void
+ construct(pointer __p, const _Tp& __val)
{ ::new((void *)__p) _Tp(__val); }
- void
+ void
destroy(pointer __p) { __p->~_Tp(); }
#endif
};
inline bool
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return true; }
-
+
template<typename _Tp>
inline bool
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)