Section: 16.2 [networking.ts::buffer.reqmts] Status: NAD Submitter: Vinnie Falco Opened: 2018-10-07 Last modified: 2020-09-06
Priority: Not Prioritized
View all other issues in [networking.ts::buffer.reqmts].
View all issues with NAD status.
Discussion:
Addresses: networking.tsBuffer sequence iterators in [networking.ts] differ from the current standard iterator requirements in that the value returned upon dereferencing is not required to be a reference type. This change is vital for allowing authors to create useful, lazily-evaluated views which meet the requirements of buffer sequences. Unfortunately the updated language is incompatible with the standard iterator requirements for equality testing, because the addresses of value types returned by buffer sequence iterators may not be stable. The change proposed in this defect report defines a new metric for buffer sequence iterator equality.
11-2018 Status to NAD after discussion on the reflector.
Proposed resolution:
This wording is relative to the N4734.
Modify 16.2.1 [networking.ts::buffer.reqmts.mutablebuffersequence], Table 12 "MutableBufferSequence requirements", as indicated:
Table 12 — MutableBufferSequence requirements expression return type assertion/note
pre/post-conditionnet::buffer_sequence_begin(x)
net::buffer_sequence_end(x)An iterator type whose reference
type
is convertible tomutable_buffer
and which
satisfies all the requirements for bidirectional
iterators (C++ 2014 [bidirectional.iterators]) except that:
- there is no requirement that
operator->
is provided, and- there is no requirement that
reference
be a reference type., and- for iterators
a
andb
there is no requirement thata == b
if and
only if*a
and*b
are bound to the
same object, anda == b
if and only if
distance(buffer_sequence_begin(x), a) == distance(buffer_sequence_begin(x), b)
[…]
Modify 16.2.2 [networking.ts::buffer.reqmts.constbuffersequence], Table 13 "ConstBufferSequence requirements", as indicated:
Table 13 — ConstBufferSequence requirements expression return type assertion/note
pre/post-conditionnet::buffer_sequence_begin(x)
net::buffer_sequence_end(x)An iterator type whose reference
type is convertible to
const_buffer
and which satisfies all the requirements for
bidirectional iterators (C++ 2014 [bidirectional.iterators]) except that:
- there is no requirement that
operator->
is provided, and- there is no requirement that
reference
be a reference
type., and- for iterators
a
andb
there is no
requirement thata == b
if and only if*a
and
*b
are bound to the same object, anda == b
if and only if
distance(buffer_sequence_begin(x), a) == distance(buffer_sequence_begin(x), b)
[…]