thread_specific_ptr is currently (Boost 1.59) not moveable, since it defines a user-declared destructor and in addition (privately) user-declares the copy special member functions. Is this decision by design, or simply not yet updated to move semantics?
From what I can tell, a move should be possible along the lines of:
auto* p = other.release(); // without invoking other's cleanup fn reset(p); // potentially differente cleanup fn associated The only problematic situation I can think of is a scenario with two semantically different custom cleanup function where a move eventually triggers only the second one. But this is behavior is consistent with move semantic. Cheers, Daniel J H References:
http://www.boost.org/doc/libs/1_59_0/doc/html/thread/thread_local_storage.ht...