template<typename T1>
CustomAllocator(const CustomAllocator<T1>&) throw()
{
buffers = new std::vector<void*>();
bufferSize = other.bufferSize;
for (int i = 0; i < other.buffers->size(); ++i)
{
auto buf = malloc(bufferSize);
std::memcpy(buf, other.buffers->at(i), bufferSize);
buffers->push_back(buf);
}
currentBuffer = buffers->back();
bufferPosition = other.bufferPosition;
}
void _Adopt(const _Container_base12* _Parent) noexcept {
if (_Parent) {
// have a parent, do adoption
_Container_proxy* _Parent_proxy = _Parent->_Myproxy; // Либо здесь эксепшн
#if _ITERATOR_DEBUG_LEVEL == 2
if (_Myproxy != _Parent_proxy) { // change parentage
_Lockit _Lock(_LOCK_DEBUG);
_Orphan_me();
_Mynextiter = _Parent_proxy->_Myfirstiter; // Либо здесь
_Parent_proxy->_Myfirstiter = this;
_Myproxy = _Parent_proxy;