[libcxx-commits] [libcxx] [libc++] Optimizations for uniform_int_distribution (PR #140161)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 15 17:40:28 PDT 2025


================
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++03
+
+#include <benchmark/benchmark.h>
+#include <cstdint>
+#include <random>
+
+template <typename Eng, std::uint64_t Max>
+static void bm_rand_uni_int(benchmark::State& state) {
----------------
LRFLEW wrote:

That works for me. I had just used this name to match the file's name, but I agree that using the full class name makes more sense here.

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


More information about the libcxx-commits mailing list