public:
explicit
- _DestroyGuard(const _Iter* __iter)
- : _M_first(*__iter), _M_cur(__iter)
+ _DestroyGuard(const _Iter& __iter)
+ : _M_first(__iter), _M_cur(std::__addressof(__iter))
{ }
void
struct _DestroyGuard<_Iter>
{
explicit
- _DestroyGuard(const _Iter*)
+ _DestroyGuard(const _Iter&)
{ }
void
return ranges::next(__first, __last);
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __first != __last; ++__first)
::new (__detail::__voidify(*__first)) _ValueType;
__guard.release();
return ranges::next(__first, __n);
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __n > 0; ++__first, (void) --__n)
::new (__detail::__voidify(*__first)) _ValueType;
__guard.release();
return ranges::fill(__first, __last, _ValueType());
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __first != __last; ++__first)
::new (__detail::__voidify(*__first)) _ValueType();
__guard.release();
return ranges::fill_n(__first, __n, _ValueType());
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __n > 0; ++__first, (void) --__n)
::new (__detail::__voidify(*__first)) _ValueType();
__guard.release();
}
else
{
- auto __guard = __detail::_DestroyGuard(&__ofirst);
+ auto __guard = __detail::_DestroyGuard(__ofirst);
for (; __ifirst != __ilast && __ofirst != __olast;
++__ofirst, (void)++__ifirst)
::new (__detail::__voidify(*__ofirst)) _OutType(*__ifirst);
}
else
{
- auto __guard = __detail::_DestroyGuard(&__ofirst);
+ auto __guard = __detail::_DestroyGuard(__ofirst);
for (; __n > 0 && __ofirst != __olast;
++__ofirst, (void)++__ifirst, (void)--__n)
::new (__detail::__voidify(*__ofirst)) _OutType(*__ifirst);
}
else
{
- auto __guard = __detail::_DestroyGuard(&__ofirst);
+ auto __guard = __detail::_DestroyGuard(__ofirst);
for (; __ifirst != __ilast && __ofirst != __olast;
++__ofirst, (void)++__ifirst)
::new (__detail::__voidify(*__ofirst))
}
else
{
- auto __guard = __detail::_DestroyGuard(&__ofirst);
+ auto __guard = __detail::_DestroyGuard(__ofirst);
for (; __n > 0 && __ofirst != __olast;
++__ofirst, (void)++__ifirst, (void)--__n)
::new (__detail::__voidify(*__ofirst))
return ranges::fill(__first, __last, __x);
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __first != __last; ++__first)
::new (__detail::__voidify(*__first)) _ValueType(__x);
__guard.release();
return ranges::fill_n(__first, __n, __x);
else
{
- auto __guard = __detail::_DestroyGuard(&__first);
+ auto __guard = __detail::_DestroyGuard(__first);
for (; __n > 0; ++__first, (void)--__n)
::new (__detail::__voidify(*__first)) _ValueType(__x);
__guard.release();