Files
clang-p2996/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/default.pass.cpp
Arthur O'Dwyer 8b29b84c99 [libc++] Fix LWG3422 "Issues of seed_seq's constructors"
https://cplusplus.github.io/LWG/issue3422

Also add a static_assert to check the "Mandates:" on the
iterator-pair constructor. Oddly, the `InputIterator` parameter
itself is merely preconditioned, not constrained, to satisfy the
input iterator requirements.

Also drive-by rename `init` to `__init`.

Differential Revision: https://reviews.llvm.org/D117962
2022-01-24 20:14:25 -05:00

30 lines
614 B
C++

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// <random>
// class seed_seq;
// seed_seq();
#include <random>
#include <cassert>
#include "test_macros.h"
int main(int, char**)
{
ASSERT_NOEXCEPT(std::seed_seq());
{
std::seed_seq s;
assert(s.size() == 0);
}
return 0;
}