Add a tutorial on allocator support - #140
Conversation
|
@jbcoe I put together this draft of the tutorial, but it definitely needs some work. Do you have any suggestions to avoid duplicating |
e431370 to
d46e9af
Compare
jbcoe
left a comment
There was a problem hiding this comment.
This looks great on a first pass.
Maybe we could introduce the allocator-extended constructors as a step on their own?
|
@jbcoe Do we care about the exception guarantee for this demonstration? Right now it's using the basic guarantee because it made showcasing a little simpler, but if |
It might be useful to add as another stage. We would like a strong exception guarantee if possible. |
I would not worry about duplicating |
|
@RyanJK5 I merged |
|
Sorry to re-request, but the exception section turned out to be fairly sizable. |
Happy to re-review. |
|
|
||
| Owner() | ||
| requires std::default_initializable<Alloc> | ||
| = default; |
There was a problem hiding this comment.
Formatting here is not ideal. Not blocking but I wonder if our .clang-format settings can be improved?
There was a problem hiding this comment.
Good catch, I would expect the requires clause to be on the same line as the constructor.
First draft of a tutorial. Walks through adding basic default-initialized allocator support, then stateful allocators and copy semantics, and finally allocator-aware move and swap semantics.
Closes #139.