
"Phil Bouchard" <philippe@fornux.com> wrote in message news:g1jdel$fuj$1@ger.gmane.org... [...]
complexity goes down to O(n) for array allocations. All in all shifted_ptr behaves differently when a pointer resides either on the: 1. stack & data segment 2. local heap 3. system heap
[...] While thinking about it maybe I will reduce the distinction of all those segments down to local heap allocations only. This way there might be possible cyclicism when the pointer is used with standard containers using standard allocators we got more advantages because: - It doesn't uglyfies the code - shifted_ptr won't benefit from speedups - Wrapping containers using different allocator is easy: template <typename T> class sh_vector : public std::vector<T, boost::pool::sh_alloc> { ... }; I'll do that Sunday night. Thank you, -Phil