std::subtra...engine::seed(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ std::subtra...engine::seed(3) πŸŽ€

okay so bestie, we're in the C++ Standard Libary manual β€” yes, the original page spells it β€œLibary,” and we are keeping that exact energy. This page is about std::subtract_with_carry_engine::seed, and it is lowkey just the β€œset the state of the random-number engine” button. No cap. ✨

✨ NAME ✨

std::subtract_with_carry_engine::seed - std::subtract_with_carry_engine::seed

🌈 Synopsis 🌈

void seed( result_type value = 0u ); (1) (since C++11)
template< class SeedSeq >            (2) (since C++11)
void seed( SeedSeq& seq );

This thing sets the state of the random-number engine. That is the whole vibe, fr fr. 🫢

  1. Right after the state is set, *this == std::subtract_with_carry_engine(value) is true.
  2. Right after the state is set, *this == std::subtract_with_carry_engine(seq) is true.

πŸ“ Parameters πŸ“

  • value β€” seed value to use to set the state.
  • seq β€” seed sequence to use to set the state.

πŸ’… Exceptions πŸ’…

Throws nothing. literally nothing. silent. iconic. πŸ’€

πŸ”₯ Complexity πŸ”₯

  1. Same as std::subtract_with_carry_engine(value).
  2. Same as std::subtract_with_carry_engine(seq).

πŸ› Defect reports πŸ›

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

  • DR: LWG 3809 β€” Applied to: C++11; Behavior as published: the default argument of value was default_seed; Correct behavior: changed to 0u.

kisses and sparkles, bestie πŸ’– β€” source/version: http://cppreference.com, 2024.06.10, and the page title is std::subtra...engine::seed(3). Go seed something cute. 🫢

πŸ“¦ where this page comes from