
Daniel James wrote:
2009/8/24 Stewart, Robert <Robert.Stewart@sig.com>:
You might also point the default constructed instance to a special, static bucket so the end iterator can refer to that.
I can't do that because I'm fully supporting allocators, so pointers can only point to memory allocated with the allocator.
Does it meter what allocator was used to allocate a static object that is not going to be deallocated until program exit or even will never be deallocated at all? On the other hand maybe you can allocate static objects with an allocator as well? If the allocator is stateless and is part of your container type, I believe, it is possible to use it to allocate static instances. I did not look at the code. If you are supporting allocators with state that are per instance objects this is not an option, of cause.