asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Introduce ProtoAllocator type requirements.

Open chriskohlhoff opened this issue 10 years ago • 5 comments

JW to provide wording. For use in async.reqmts.async.alloc.

chriskohlhoff avatar Feb 23 '15 14:02 chriskohlhoff

Also used elsewhere like in associated_allocator.

chriskohlhoff avatar Feb 24 '15 08:02 chriskohlhoff

I think something like this:

A type A meets the proto-allocator requirements if allocator_traits<A>::rebind_alloc<U> meets the allocator requirements, where U is an object type. [Note: For example, std::allocator<void> meets the proto-allocator requirements but not the allocator requirements. --end note]

The name quasi-allocator was also suggested.

jwakely avatar Mar 06 '15 19:03 jwakely

Does it also need to list some other requirements from Allocator? I.e. that it be CopyConstructible, Destructible, etc., and maybe also: "No constructor, comparison operator, copy operation, move operation, or swap operation on these types shall exit via an exception."

chriskohlhoff avatar Mar 06 '15 22:03 chriskohlhoff

Yes, good point.

jwakely avatar Mar 07 '15 00:03 jwakely

I checked in some wording. Please take a look at the latest html on chriskohlhoff.github.io/asio-tr2.

Proto-allocator has grown on me. Sort of like proto stars.

On Sat, Mar 7, 2015, at 11:04 AM, Jonathan Wakely wrote:

Yes, good point.


Reply to this email directly or view it on GitHub: https://github.com/chriskohlhoff/asio-tr2/issues/28#issuecomment-77658959

chriskohlhoff avatar Mar 07 '15 00:03 chriskohlhoff