Comments (4)
some sort of 8-bit quantity
What if there is no such type on the host?
Returning std::uint8_t* would be a completely compatible change
No it wouldn't, because uint8_t
is not guaranteed to exist, consider systems with 16-bit bytes.
As noted above there are various proposals for span
types, and std::byte
could be useful here. We can evaluate them for a v2 of this TS, or when moving these things into the main standard.
from networking-ts.
Thanks for the suggestion. The latest draft has been sent to ISO as a PDTS now, so I'll raise this as a national body against the PDTS so that the committee considers it.
from networking-ts.
I'm just going to throw this out there - it sure would be nice if const_buffer::data
and mutable_buffer::data
returned a pointer to some sort of 8-bit quantity instead of a pointer to void. This would allow pointer arithmetic.
I forsee the use of const_buffer
for much more than just networking operations. Its a great general purpose class. You could use it in a key/value database interface to pass buffers around. We have our own Slice
class which works just like const_buffer
, and we will switch to const_buffer
when it appears in the standard. But data
returning void*
is really rather pointless. Returning std::uint8_t*
would be a completely compatible change, and the return value would then have more utility.
from networking-ts.
This was submitted as a National Body comment against the PDTS, and discussed by the Library Evolution Working Group, see https://issues.isocpp.org/show_bug.cgi?id=301
from networking-ts.
Related Issues (20)
- [async.reqmts.proto.allocator] "No constructor ... shall exit via an exception" over-specification
- Where is the null_buffers? HOT 4
- user-provided overloads of buffer_size intended? HOT 7
- Add integer_option helper HOT 3
- [async.reqmts.async.handler.exec] refers to Executor1 from previous subclause
- [async.exec.binder] executor_binder and function types
- Unnecessary uses of DECAY_COPY HOT 1
- Fix use of "(possibly const) value of type" in requirements HOT 1
- Terms and Definitions don't follow ISO directives HOT 1
- [socket.streambuf.virtual] underspecified
- [internet.endpoint.extensible] condition too long to fit on one line
- Normative references section doesn't actually include any normative references HOT 1
- [async.reqmts.service] uses is_base_of_v HOT 2
- `execution_context` is not ExecutionContext
- Service cannot access associated Executor HOT 1
- No hanging paragraphs
- Use std::byte for bytes_type HOT 1
- Why return a default constructed ip address on failure?
- Question: RIP? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from networking-ts.