std::thread::id(3)

πŸ’– std::thread::id β€” the manual page, but make it cute πŸ’–

okay bestie, this one is a libstdc++ page from the Library Functions Manual, and it's genuinely short, so we're gonna get through it together and you're gonna leave knowing exactly what std::thread::id is. no cap. 🫢


✨ NAME ✨

std::thread::id β€” the little name tag your thread wears so everyone can tell it apart from the other threads πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <thread>

πŸ’œ Public Member Functions

  • id (native_handle_type __id) β€” the constructor, and it takes a native_handle_type __id, so it builds an id out of a native handle. that's it, that's the whole member function list, we love a low-maintenance icon 😌

πŸŽ€ Friends

the friend zone, but make it C++:

  • struct hash< id >
  • template<class _CharT, class _Traits> basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out, id __id)
  • strong_ordering operator<=> (id __x, id __y) noexcept
  • bool operator== (id __x, id __y) noexcept
  • class thread
heads up bestie β€” these are not member symbols. they're just hanging out in the same neighborhood.
  • bool operator== (thread::id __x, thread::id __y) noexcept
  • strong_ordering operator<=> (thread::id __x, thread::id __y) noexcept
  • template<class _CharT, class _Traits> basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out, thread::id __id)

🌈 Detailed Description 🌈

A std::thread::id is a unique identifier for a thread. that's the vibe. one thread, one id, no duplicates, no drama. ✨

⭐ Since

C++11 β€” she's been here since the beginning of the thread era and she's never left. iconic behavior honestly. πŸ‘‘


πŸ“ Author πŸ“

Generated automatically by Doxygen for libstdc++ from the source code. so like, no human author to thank, the robots did it, and honestly? slay. πŸ€–πŸ’–


ok that's the whole page bestie, go forth and identify your threads, mwah πŸ’…

libstdc++ β€” std::thread::id(3), straight out of the Library Functions Manual. ty for reading my little rewrite, ily, bye πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms