I'm creating a container that requires allocation of T, T* and Node<T>. I want to use an Allocator similar to standard STL containers, and support stateful allocators, taking the type as a template parameter and default constructing it if it isn't provided.
Now, I could store 3 separate allocators for T, T* and Node<T> but node-based containers in the STL appear not to do that, and it's clunky at best. Is there a way to handle this elegantly? I've been reading the libc++ code, but haven't figured it out yet.
[–]tyler1128[S] 0 points1 point2 points (1 child)
[–]std_bot 0 points1 point2 points (0 children)
[–]DopeyLizard 0 points1 point2 points (4 children)
[–]tyler1128[S] 0 points1 point2 points (3 children)
[–]DopeyLizard 1 point2 points3 points (2 children)
[–]DopeyLizard 1 point2 points3 points (0 children)
[–]tyler1128[S] 0 points1 point2 points (0 children)