std::seed_seq::param

1
2
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 OutputIterator.

Return value

(none).

Exceptions

Throws only if an operation on dest throws.

Example

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

Output:

1
-1 0 1
doc_CPP
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.