I love you dispatch_data_t. It provides a useful abstraction at the top of the memory range: it provides reference counting, allows consumers to create arbitrary subbands (which are involved in the ref count of the parent range), concatenation of the subbands, etc. (I won 'feel free to look into the details - the documents are right here: Managing send data objects )
I tried to find out if there is a C ++ 11 equivalent, but the terms “range”, “memory” and “reference counting” are pretty general, which makes Google search too complicated. I suspect someone who spends more time with the standard C ++ library than I can know from my head.
Yes, I know that I can use the API dispatch_data_tfrom C ++ code, and yes, I know that it’s easy to scroll through the naive implementation of the first pass of such a thing, but I'm specifically looking for something idiomatic for C ++, and with high gloss / reliability. (May be?)
ipmcc source
share