[libcxx-commits] [libcxx] [libc++] Add a static_assert for a Mandates in seed_seq (PR #86992)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 30 11:40:13 PDT 2024


================
@@ -0,0 +1,57 @@
+//===----------------------------------------------------------------------===//
+//
+// 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;
+
+// template<class RandomAccessIterator>
+//     void generate(RandomAccessIterator begin, RandomAccessIterator end);
+
+// Check the following requirement: https://eel.is/c++draft/rand.util.seedseq#7
+//
+//  Mandates: iterator_traits<RandomAccessIterator>​::​​value_type is an unsigned integer
+//            type capable of accommodating 32-bit quantities.
+
+// UNSUPPORTED: c++03
+// REQUIRES: stdlib=libc++
----------------
mordante wrote:

This is an implicit requirement of `verify` tests.
```suggestion
```

https://github.com/llvm/llvm-project/pull/86992


More information about the libcxx-commits mailing list