dstruct icon indicating copy to clipboard operation
dstruct copied to clipboard

Allocator: different alloc-type control

Open Sunrisepeak opened this issue 1 year ago • 0 comments

  • 不同分配器间(内存来源)的对象, 禁用移动语义

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);
}

Sunrisepeak avatar May 16 '24 02:05 Sunrisepeak