diff --git a/stl/inc/random b/stl/inc/random index 2ed8c68bb06..fd69502e6a2 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -147,9 +147,9 @@ class seed_seq { // standard sequence of seed values public: using result_type = unsigned int; - seed_seq() {} + seed_seq() noexcept {} - template + template , int> = 0> seed_seq(initializer_list<_Ty> _Ilist) { _Construct(_Ilist.begin(), _Ilist.end()); } diff --git a/tests/std/test.lst b/tests/std/test.lst index f3f611f9b5b..5a3f74652f4 100644 --- a/tests/std/test.lst +++ b/tests/std/test.lst @@ -189,6 +189,7 @@ tests\GH_002058_debug_iterator_race tests\GH_002120_streambuf_seekpos_and_seekoff tests\LWG2597_complex_branch_cut tests\LWG3018_shared_ptr_function +tests\LWG3422_seed_seq_ctors tests\P0019R8_atomic_ref tests\P0024R2_parallel_algorithms_adjacent_difference tests\P0024R2_parallel_algorithms_adjacent_find diff --git a/tests/std/tests/LWG3422_seed_seq_ctors/env.lst b/tests/std/tests/LWG3422_seed_seq_ctors/env.lst new file mode 100644 index 00000000000..19f025bd0e6 --- /dev/null +++ b/tests/std/tests/LWG3422_seed_seq_ctors/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\usual_matrix.lst diff --git a/tests/std/tests/LWG3422_seed_seq_ctors/test.compile.pass.cpp b/tests/std/tests/LWG3422_seed_seq_ctors/test.compile.pass.cpp new file mode 100644 index 00000000000..8264020b829 --- /dev/null +++ b/tests/std/tests/LWG3422_seed_seq_ctors/test.compile.pass.cpp @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include +#include + +using namespace std; + +int main() { + static_assert(is_nothrow_default_constructible_v, ""); + static_assert(!is_constructible_v::iterator>>, ""); + static_assert(is_constructible_v>, ""); +}