std::seed_seq::size(3)
π NAME π
Okay so welcome to the <std::seed_seq::size> page from the C++ Standard Libary manual β yes bestie, that's the manual name, typo and all, and we are moving π
β¨
std::seed_seq::sizeβstd::seed_seq::size, periodt. That's the whole name, no cap π
π Synopsis π
std::size_t size() const noexcept; (since C++11)
Returns the size of the stored initial seed sequence. Slay π¦
π§ Parameters π§
(none)β literally none, bestie. Nothing to pass, nothing to stress about π«Ά
π Return value π
The size of the private container that was populated at construction time. That's the whole vibe β¨
β‘ Complexity β‘
Constant time. Iconic, lowkey effortless, no cap π
πΈ Example πΈ
// Run this code
#include <iostream>
#include <random>
int main()
{
std::seed_seq s1 = {-1, 0, 1};
std::cout << s1.size() << '\n';
}
π Output
3
π©Ή Defect report π©Ή
The following behavior-changing defect reports were applied retroactively to previously published C++ standards. History being messy, as usual π
- DR:
LWG 2440Β· Applied to:C++11Β· Behavior as published:seed_seq::size was not required to be noexceptΒ· Correct behavior:required
Source: http://cppreference.com Β· version: 2024.06.10 Β· page: std::seed_seq::size(3) β mwah, that's the cute lil sign-off, bestie ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms