std::random_device(3)

✨ std::random_device ✨

okay bestie, gather round, because we're doing std::random_device from the Library Functions Manual, section 3, and honestly? she's a whole vibe. this is a manual page, which means it's technically documentation, which means we're reading it together like it's the group chat. πŸ’…


🌸 NAME 🌸

std::random_device β€” that's it, that's the name, short and iconic, no notes. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, you gotta let the compiler know you want this energy in your life:

#include <random>

✨ Public Types ✨

  • typedef unsigned int result_type β€” the kind of number she hands you. it's an unsigned int, bestie.

πŸ’– Public Member Functions πŸ’–

  • random_device (const random_device &)=delete β€” copying her? not allowed. she said "no copies, periodt."
  • random_device (const std::string &__token) β€” the constructor that takes a std::string token. that's your way in.
  • double entropy () const noexcept β€” asks how much entropy she's got. returns a double. it's noexcept, so she promises not to throw hands. 🫢
  • result_type operator() () β€” the main character moment. call her and you get a result_type back. πŸ”₯
  • void operator= (const random_device &)=delete β€” assignment operator? also deleted. no copying, no reassigning, she's not that kind of girl. πŸ’€

πŸŽ€ Static Public Member Functions πŸŽ€

  • static constexpr result_type max () β€” the biggest value she can produce.
  • static constexpr result_type min () β€” the smallest value she can produce.

🌈 Detailed Description 🌈

A standard interface to a platform-specific non-deterministic random number generator (if any are available).

read that "(if any are available)" again, bestie. she's platform-specific, and sometimes the platform just doesn't have the goods. it's giving "depends where you live." 🫠

Since β€” C++11. she's been here since C++11 and she's never left. legend behavior. ⭐


🧚 Member Typedef Documentation 🧚

🌸 typedef unsigned int std::random_device::result_type 🌸

The type of the generated random value.

that's it. that's the whole note. unsigned int. go off, queen. πŸ‘‘


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code.

so technically no human wrote this page, it's a Doxygen robot. still ate though. πŸ™ˆ

and that's the whole page, fr fr. no cap, every flag, every signature, every detail, all present and accounted for. this page came to you courtesy of libstdc++ β€” that's the source and the version vibe right there β€” so shoutout to the libstdc++ girlies for keeping std::random_device documented and slaying. πŸ’–βœ¨πŸŽ€πŸ¦‹ bye bestie, go generate something non-deterministic. πŸ’…

πŸ“¦ 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