https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67114
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- The C++ standard requires thread::id objects to be comparable with operator< and for it to impose a total order. The current libstdc++ code assumes that a total order can be obtained simply by comparing the pthread_t objects, which is not portable, but some form of total order over pthread_t objects is needed. For w32-pthreads comparing thread sequence numbers should be sufficient.