storage_adaptor<std::vector> missing efficient move assignment from std::vector
Open
- Dominant language
- C++
- Stars
- 334
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Often times to extend the behaviour of `boost::histogram`, we need unsafe access to storage. And there is one performance issue with working with storage_adaptor.
My use case can be simplified to:
```cpp
auto hist = make_histogram_with(std::vector(), axis::regular(100, 0, 100));
auto& storage = unsafe_access::storage(hist);
storage = std::vector(1000);
```
The `storage = std::vector(1000);` line would not call the move assignment operator, but rather `vector_impl::operator=(const U& u)`, which copies the values instead of just swapping the data pointer.
Contributor guide
Assessment
This issue has not been assessed yet.