SysTutorials

Linux Manual Pages › Section 3

stdseed_seqsize(3)

std::seed_seq::size - std::seed_seq::size

Synopsis

std::size_t size() const; (since C++11)                                     (until C++17) std::size_t size() const noexcept; (since C++17) Returns the size of the stored initial seed sequence.

Parameters

(none)

Return value

The size of the private container that was populated at construction time.

Complexity

Constant time.

Example

// Run this code

#include <random>
#include <iostream>
int main()
{
std::seed_seq s1 = {-1, 0, 1};
std::cout << s1.size() << ‘\n’;
}

Output:

  3