Section: 16.2.4 [networking.ts::buffer.reqmts.dynamicbuffer] Status: New Submitter: Vinnie Falco Opened: 2017-10-16 Last modified: 2020-09-06 13:52:31 UTC
View other active issues in [networking.ts::buffer.reqmts.dynamicbuffer].
View all other issues in [networking.ts::buffer.reqmts.dynamicbuffer].
View all issues with New status.
The current wording for the DynamicBuffer prepare member function implies that std::length_error is the only allowable thrown exception. This should be changed to reflect that any exception may be thrown, with std::length_error thrown in particular when size() + n exceeds max_size().
Priority set to 3 after five votes on mailing list
This wording is relative to N4588.
Change 16.2.4 [networking.ts::buffer.reqmts.dynamicbuffer], Table 14 "DynamicBuffer requirements", as indicated:
Table 14 — DynamicBuffer requirements expression return type assertion/note pre/post-condition […] x.prepare(n) X::mutable_buffers_type Returns a mutable buffer sequence u
representing the writable bytes, and where
buffer_size(u) == n . The dynamic buffer
reallocates memory as required. All constant or
mutable buffer sequences previously obtained using
data() or prepare() are invalidated.
Throws: length_error if size() + n
exceeds max_size() .