[libcxx-commits] [libcxx] 7844257 - [libc++] Use explicit #include instead of transitive #include (#115420)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 8 07:07:54 PST 2024


Author: Peng Liu
Date: 2024-11-08T16:07:51+01:00
New Revision: 7844257fc2afe490ae4b923a770d20dabed5c3c6

URL: https://github.com/llvm/llvm-project/commit/7844257fc2afe490ae4b923a770d20dabed5c3c6
DIFF: https://github.com/llvm/llvm-project/commit/7844257fc2afe490ae4b923a770d20dabed5c3c6.diff

LOG: [libc++] Use explicit #include instead of transitive #include (#115420)

This benchmark test currently uses `std::unique_ptr` without explicitly
`#include <memory>`. I think we should not rely on transitive inclusion.

Added: 
    

Modified: 
    libcxx/test/benchmarks/vector_operations.bench.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/vector_operations.bench.cpp
index b0dffe35ec6e14..ce8ab233fc9817 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/vector_operations.bench.cpp
@@ -13,6 +13,8 @@
 #include <cstring>
 #include <deque>
 #include <functional>
+#include <memory>
+#include <string>
 #include <vector>
 
 #include "benchmark/benchmark.h"


        


More information about the libcxx-commits mailing list