21 Oct
2021
21 Oct
'21
1:43 a.m.
On Wed, Oct 20, 2021 at 5:58 PM Gavin Lambert via Boost
people should start getting more used to these sorts of considerations and be less prone to making such errors.
This is my position as well. string_view is "dangerous" but you get a corresponding improvement in power. It really isn't much different than calling async functions with unowned buffers, e.g.: std::string s; sock.async_write_some( asio::buffer(s), ... ); There isn't any realistic way to protect from this which is why I think that the proposed schemes for helping the users avoid shooting themselves in the foot are not good solutions. Thanks