asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Can we create a dynamic_deque_buffer?

Open chriskohlhoff opened this issue 10 years ago • 1 comments

chriskohlhoff avatar Feb 26 '15 08:02 chriskohlhoff

Pre-Lenexa Summary

Related to [buffer.reqmts.dynamicbuffer]

The proposal currently provides dynamic_string_buffer and dynamic_buffer_vector. When these grow and shrink, the underlying container is resized and additional data copies will be incurred. If this additional copying is undesirable, users do have the option of implementing the type requirements themselves, e.g. in terms of a circular buffer.

Jens proposed that the library also provide dynamic_deque_buffer, which would also allow these data copies to be avoided. This cannot be implemented outside of the standard library as std::deque does not expose its internal data segments.

chriskohlhoff avatar May 04 '15 10:05 chriskohlhoff