dstruct
dstruct copied to clipboard
Allocator: different alloc-type control
- 不同分配器间(内存来源)的对象, 禁用移动语义
dstruct::Vector<int, MyAllocator2> test() {
dstruct::Vector<int, MyAllocator1> vec1;
dstruct::Vector<int, MyAllocator2> vec2;
// do something
// vec1 = vec2
return dstruct::Vector<int, MyAllocator2>::convert(vec1);
return dstruct::Vector<int, MyAllocator2>::copy(vec1);
return dstruct::copy_to<Vector<int, MyAllocator2>>(vec1);
}