std::seed_seq::param

From cppreference.com
< cpp‎ | numeric‎ | random‎ | seed seq
 
 
 
Pseudo-random number generation
Uniform random bit generators
Engines and engine adaptors
Non-deterministic generator
Distributions
Uniform distributions
Bernoulli distributions
Poisson distributions
Normal distributions
Sampling distributions
Seed Sequences
(C++11)
C library
 
std::seed_seq
Member functions
seed_seq::param
(C++11)
 
template< class OutputIt >
void param( OutputIt dest ) const;
(since C++11)

Outputs the initial seed sequence that's stored in the std::seed_seq object.

Parameters

dest - output iterator such that the expression *dest = rt is valid for a value rt of result_type
Type requirements
-
OutputIt must meet the requirements of LegacyOutputIterator.

Return value

(none)

Exceptions

Throws only if an operation on dest throws.

Example

#include <iostream>
#include <iterator>
#include <random>
 
int main()
{
    std::seed_seq s1 = {-1, 0, 1};
    s1.param(std::ostream_iterator<int>(std::cout, " "));
}

Output:

-1 0 1