#pragma GCC system_header
#endif
+extern "C" int printf(const char * __restrict, ...);
+
_LIBCPP_BEGIN_NAMESPACE_STD
// addressof moved to <__functional_base>
__construct_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
{
ptrdiff_t _Np = __end1 - __begin1;
- _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp));
+ if (_Np > 0)
+ _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp));
__begin2 += _Np;
}
{
typedef typename remove_const<_Tp>::type _Vp;
ptrdiff_t _Np = __end1 - __begin1;
- _VSTD::memcpy(const_cast<_Vp*>(__begin2), __begin1, _Np * sizeof(_Tp));
+ if (_Np > 0)
+ _VSTD::memcpy(const_cast<_Vp*>(__begin2), __begin1, _Np * sizeof(_Tp));
__begin2 += _Np;
}
{
ptrdiff_t _Np = __end1 - __begin1;
__end2 -= _Np;
- _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));
+ if (_Np > 0)
+ _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));
}
private: