And on StackOverflow read comments.
As solution I think that
but in STL we have type thread::id that have thread_id_t or something close to this.
Anyway thread::id type can be represented as hash (something like size_t or unsigned integer 32/64 bit).
Maybe we should use a unsigned integers? and moving to STL version?
As solution I think that
reinterpret_cast<long>(reinterpret_cast<void*>(pthread_self()));
a good choice,but in STL we have type thread::id that have thread_id_t or something close to this.
Anyway thread::id type can be represented as hash (something like size_t or unsigned integer 32/64 bit).
Maybe we should use a unsigned integers? and moving to STL version?