This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
3027. [networking.ts]DynamicBuffer
prepare
exception specification
Section: 16.2.4 [networking.ts::buffer.reqmts.dynamicbuffer] Status: New Submitter: Vinnie Falco Opened: 2017-10-16 Last modified: 2020-09-06
Priority: 3
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.
Discussion:
Addresses: networking.ts
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()
.
[2017-11-08]
Priority set to 3 after five votes on mailing list
Proposed resolution:
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 sequenceu
representing the writable bytes, and wherebuffer_size(u) == n
. The dynamic buffer
reallocates memory as required. All constant or
mutable buffer sequences previously obtained usingdata()
orprepare()
are invalidated.
Throws:length_error
ifsize() + n
exceedsmax_size()
or any other exception
if the request cannot otherwise be satisfied.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4