
Am Tuesday 12 January 2010 21:10:57 schrieb vicente.botet:
Stefan, I have never talk about reset function but the operator*. Just quoting yourself "thread_specific_ptr operator*: one branch to make sure the vector is large enough(a new thread_specific_ptr might have been created by another thread), one indirection. constant-time average, linear to vector if reallocation is necessary. but that can only happen when a new thread_specific_ptr was created."
like I said, "peter“s right, no reallocation in operator*.". I should have differentiated between get(), reset() and operator* in that description. the fact is that only reset() needs to reallocate, and the discussion of possibly changing the implementation of thread_specific_ptr should be continued on that basis, no matter what I mistakenly wrote before. sorry for the confusion.