[libcxx-commits] [libcxx] Optimize input iterator overload of `std::vector::assign(first, last)` (PR #113852)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 26 14:20:10 PST 2024
================
@@ -116,6 +116,23 @@ inline std::vector<std::string> getRandomStringInputs(std::size_t N) {
return inputs;
}
+inline std::vector<std::string> getRandomStringInputsWithLength(std::size_t N, std::size_t len) { // N-by-len
+ std::vector<std::string> inputs;
+ inputs.reserve(N);
+ for (std::size_t i = 0; i < N; ++i)
+ inputs.push_back(getRandomString(len));
+ return inputs;
+}
+
+template <class IntT>
+inline std::vector<std::vector<IntT>> getRandomIntegerInputsWithLength(std::size_t N, std::size_t len) { // N-by-len
----------------
winner245 wrote:
Thanks.
https://github.com/llvm/llvm-project/pull/113852
More information about the libcxx-commits
mailing list