|
@ -131,7 +131,7 @@ namespace gp{ |
|
|
if(T* new_ary = (T*)alloc.get().allocate(new_data_size); new_ary) { |
|
|
if(T* new_ary = (T*)alloc.get().allocate(new_data_size); new_ary) { |
|
|
auto new_it = new_ary; |
|
|
auto new_it = new_ary; |
|
|
for(auto& elem : *this) { |
|
|
for(auto& elem : *this) { |
|
|
new(o">++new_it) T(gp::move(elem)); |
|
|
|
|
|
|
|
|
new(n">new_it++) T(gp::move(elem)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(ary != nullptr) gp_config::assertion(alloc.get().deallocate(ary), "failed to deallocate old range"); |
|
|
if(ary != nullptr) gp_config::assertion(alloc.get().deallocate(ary), "failed to deallocate old range"); |
|
@ -258,4 +258,4 @@ namespace gp{ |
|
|
return gp::buffer<T>{(T*)ary, (T*)ary+sz}; |
|
|
return gp::buffer<T>{(T*)ary, (T*)ary+sz}; |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
} |
|
|
|
|
|
|
|
|
} |