[libcxx-commits] [libcxx] [libc++] Add a static_assert for a Mandates in seed_seq (PR #86992)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 28 12:17:37 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff f566b079f171f28366a66b8afa4a975bc4005529 1f0a9d74fae6486d3a6ca841491cace3ca2ef6ef -- libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp libcxx/include/__random/seed_seq.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
index 4320f4e323..39c93a4cb0 100644
--- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
+++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
@@ -32,21 +32,27 @@ void f() {
// Not an integral type
{
double* p = nullptr;
- seq.generate(p, p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
+ seq.generate(
+ p,
+ p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
// expected-error@*:* 0+ {{invalid operands to}}
}
// Not an unsigned type
{
long long* p = nullptr;
- seq.generate(p, p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
+ seq.generate(
+ p,
+ p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
}
// Not a 32-bit type
{
static_assert(sizeof(unsigned char) * CHAR_BIT < 32, "the test doesn't work on this platform");
unsigned char* p = nullptr;
- seq.generate(p, p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
+ seq.generate(
+ p,
+ p); // expected-error-re@*:* {{static assertion failed{{.+}}: [rand.util.seedseq]/7 requires the value_type of the iterator {{.+}}}}
}
// Everything satisfied
``````````
</details>
https://github.com/llvm/llvm-project/pull/86992
More information about the libcxx-commits
mailing list