I encountered a compilation error when using mstd::stable_vector with a type that has both its copy constructor and copy assignment operator deleted.
The error pointed to stable_vector.hpp (around line 101). The issue appears to be caused by missing perfect forwarding, which results in an attempt to use a deleted copy operation.
I was able to fix it by changing the line to:
return _data.insert(_data.cend(), std::forward<T>(value));
This ensures proper forwarding and allows move-only types to work correctly.
I encountered a compilation error when using
mstd::stable_vectorwith a type that has both its copy constructor and copy assignment operator deleted.The error pointed to
stable_vector.hpp(around line101). The issue appears to be caused by missing perfect forwarding, which results in an attempt to use a deleted copy operation.I was able to fix it by changing the line to:
return _data.insert(_data.cend(), std::forward<T>(value));This ensures proper forwarding and allows move-only types to work correctly.