
7 Jan
2008
7 Jan
'08
11:58 a.m.
Edd Dawson <lists <at> mr-edd.co.uk> writes:
Currently one cannot create a thread_specific_ptr<void> as the return type of thread_specific_ptr<void>::operator* would be void&.
So is there any technical reason that we cannot do the same trick as with shared_ptr? i.e. have operator* return a thread_specific_ptr_traits<T>::reference
It might be worth adding a specialization of thread_specific_ptr to handle void data, but I don't think that traits would be the way to do it, as it adds lots of complexity for not much gain. However, this still begs the question: why? Anthony