
12 Jan
2010
12 Jan
'10
3:05 p.m.
Vicente Botet Escriba wrote:
For me it is unacceptable to use reallocation of the vector on the operator*.
Operator* has a non-NULL precondition and doesn't need to reallocate. reset() does, but only if you set a thread_specific_ptr that has been created after the thread has started.
More, any non-constant time operator* don't satisfy my requirements for some specific contexts.
I don't think that any implementation gives you this constant time guarantee if you continually create thread-specific variables.