std::shuffl...order_engine(3)
π std::shuffle_order_engine::shuffle_order_engine π
okay bestie, buckle up π this one's from the C++ Standard Libary manpage set (yes that's how it's spelled on the tin, don't come for me) β section 3, the constructor page. it's giving "let me introduce you to my little random engine adaptor" energy and honestly? iconic.
β¨ NAME β¨
std::shuffle_order_engine::shuffle_order_engine β literally the constructor for the adaptor. that's the whole name. it said "my name is my name" π
πΈ SYNOPSIS πΈ
shuffle_order_engine(); (1) (since C++11)
explicit shuffle_order_engine( result_type s ); (2) (since C++11)
template< class Sseq > (3) (since C++11)
explicit shuffle_order_engine( Sseq& seq );
explicit shuffle_order_engine( const Engine& e ); (4) (since C++11)
explicit shuffle_order_engine( Engine&& e ); (5) (since C++11)
five whole flavours, all since C++11, no cap π₯
π¦ DESCRIPTION π¦
Constructs a new pseudo-random engine adaptor. that's the vibe. it's a fresh baby adaptor and you get to pick how it wakes up π
here's the menu, pick your main character:
- Default constructor. the underlying engine is also default-constructed. no thoughts, head empty, fully valid πΈ
- Constructs the underlying engine with
s. simple, clean, slay. - Constructs the underlying engine with seed sequence
seq. but β and this is the important part β this constructor only participates in overload resolution ifSseqqualifies as a SeedSequence. in particular, it does not participate in overload resolution ifSseqis implicitly convertible toresult_type. so if you were hoping it'd just vibe with anything, no ma'am π - Constructs the underlying engine with a copy of
e. twin behaviour, no original harmed π - Move-constructs the underlying engine with
e. after this,eholds unspecified, but valid state afterwards. it's not destroyed, it's just... different now. going through a phase. still valid tho β¨
π PARAMETERS π
sβ integer value to construct the underlying engine withseqβ seed sequence to construct the underlying engine witheβ pseudo-random number engine to initialize with
π EXAMPLE π
okay so real talk β this section is on the page but there is literally nothing in it. empty. void. nullptr of example sections π so i'm not gonna invent code and lie to you, bestie. the section exists, the example does not. iykyk.
ngl the overload-resolution footnote on option 3 is the one thing here that will actually bite you in a compile error, so keep that in your notes app π«Ά
source: http://cppreference.com Β· version / date: 2024.06.10 Β· page: std::shuffl...order_engine(3) β that's the whole footer, mwah, bye bestie, go seed something responsibly π
π§ββοΈβ
π¦ 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