Created on 2018-02-27.00:00:00 last changed 72 months ago
Proposed resolution:
This wording is relative to N4711.
Edit [buffer.read] as indicated:
-14- Remarks: This function shall not participate in overload resolution unless
is_dynamic_buffer_v<decay_t<DynamicBuffer>>
istrue
.
Edit [buffer.async.read] as indicated:
-16- Remarks: This function shall not participate in overload resolution unless
is_dynamic_buffer_v<decay_t<DynamicBuffer>>
istrue
.
Edit [buffer.write] as indicated:
-14- Remarks: This function shall not participate in overload resolution unless
is_dynamic_buffer_v<decay_t<DynamicBuffer>>
istrue
.
Edit [buffer.async.write] as indicated:
-16- Remarks: This function shall not participate in overload resolution unless
is_dynamic_buffer_v<decay_t<DynamicBuffer>>
istrue
.
[ 2019-01-20 Reflector prioritization ]
Set Priority to 3
Suppose that we have a user-defined class dyn_buf
that satisfies the DynamicBuffer
requirements ([buffer.reqmts.dynamicbuffer]), and is additionally copy-constructible. The following snippet compiles, as expected:
dyn_buf b; net::read_until(my_socket, b, "\n");
However, this next snippet will not compile, when it should:
dyn_buf b; net::read(my_socket, b);
This is due to:
DynamicBuffer
template parameter being deduced as dyn_buf&
, andread
overload being specified to not participate in overload resolution unless is_dynamic_buffer_v<DynamicBuffer>
is true
.This can fixed by changing the test to is_dynamic_buffer_v<decay_t<DynamicBuffer>>
.
History | |||
---|---|---|---|
Date | User | Action | Args |
2019-01-20 16:20:00 | admin | set | messages: + msg10287 |
2018-03-04 11:37:14 | admin | set | messages: + msg9705 |
2018-02-27 00:00:00 | admin | create |