##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::seed_seq::size

From cppreference.com
< cpp‎ | numeric‎ | random‎ | seed seq

std::size_t size() const; |  | (since C++11)

Returns the size of the stored initial seed sequence.

### [edit] Parameters

(none)

### [edit] Return value

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

### [edit] Complexity

Constant time.

### [edit] Exeptions

(none) | (until C++17)
`noexcept` specification: noexcept | (since C++17)

### [edit] Example

Run this code

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

Output:

    3

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/random/seed_seq/size&oldid=91434"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template