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 anunsigned 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 astd::stringtoken. that's your way in.double entropy () const noexceptβ asks how much entropy she's got. returns adouble. it'snoexcept, so she promises not to throw hands. π«Άresult_type operator() ()β the main character moment. call her and you get aresult_typeback. π₯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