Namespaces
Variants
Views
Actions

std::seed_seq::size

From cppreference.com
< cpp‎ | numeric‎ | random‎ | seed seq
Revision as of 17:39, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 
 

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
std::size_t size() const
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Returns the size of the stored initial seed sequence.

Contents

Parameters

(none)

Return value

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

Complexity

Constant time.

Example

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

Output:

3