std::seed_seq::size

std::seed_seq::size

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

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.

Exeptions

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

Example

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

Output:

3

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/random/seed_seq/size

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部