Repository: google/benchmark
Pull request #1948: Finish cxx version bump
Author: login: LebedevRI
Created: 2025-03-13T19:34:40Z | Merged: 2025-03-17T09:18:19Z

Fixes #1947.

Linked issue #1947: [BUG] c++17 is required instead of c++14 (as in the document)
**Describe the bug**
C++17 is actually required because of use of `string_view` in the following commit:

https://github.com/google/benchmark/commit/c68e308b4f531d43bed368ee48a4fa2c0fb44ee8

**System**
Which OS, compiler, and compiler version are you using:
  - OS: Linux
  - Compiler and version: Clang 16.0.6

**Screenshots**
when built with -std=c++14

```
benchmark/src/check.h:50:21: error: no type named 'string_view' in namespace 'std'
  CheckHandler(std::string_view check, std::string_view file,
               ~~~~~^
```

Linked issue comments: user: login: LebedevRI
created_at: 2025-03-13T18:21:56Z
body: C++14 is required *to use* benchmark: https://godbolt.org/z/xePY9qnGa
C++17-aware compiler is required to compile the library.
author_association: COLLABORATOR
user: login: LebedevRI
created_at: 2025-03-13T19:35:48Z
body: Could you please help understand how this is causing trouble in your case? How do you make it go boom?
I'm updating the docs in https://github.com/google/benchmark/pull/1948, but maybe something else needs to be done.
author_association: COLLABORATOR
user: login: jeromejj
created_at: 2025-03-13T19:40:02Z
body: > Could you please help understand how this is causing trouble in your case? How do you make it go boom? I'm updating the docs in [#1948](https://github.com/google/benchmark/pull/1948), but maybe something else needs to be done.

It's not causing too much trouble for my case, since I can just use -std=c++17 for now. But README.md says only c++14 is required which is not accurate. c++17 is required because of the use of `string_view` in https://github.com/google/benchmark/commit/c68e308b4f531d43bed368ee48a4fa2c0fb44ee8
author_association: NONE
user: login: jeromejj
created_at: 2025-03-13T19:40:55Z
body: So you can either change README.md saying c++17 is required, or you should remove the use of `string_view` (maybe there're other c++17 features in the library as well)
author_association: NONE
user: login: LebedevRI
created_at: 2025-03-13T19:57:30Z
body: Right, what i'm asking is, why are you hitting that issue? Are you using some other build system that is neither our cmakefiles nor our bazel?
author_association: COLLABORATOR
user: login: jeromejj
created_at: 2025-03-13T20:02:52Z
body: Yes, I write cmake rules in our own cmake files to build benchmark.
author_association: NONE

Diff:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd6906040d..4f67ff5e61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,17 +306,11 @@ if (BENCHMARK_USE_LIBCXX)
   endif()
 endif(BENCHMARK_USE_LIBCXX)
 
-set(EXTRA_CXX_FLAGS "")
-if (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-  # Clang on Windows fails to compile the regex feature check under C++11
-  set(EXTRA_CXX_FLAGS "-DCMAKE_CXX_STANDARD=14")
-endif()
-
 # C++ feature checks
 # Determine the correct regular expression engine to use
-cxx_feature_check(STD_REGEX ${EXTRA_CXX_FLAGS})
-cxx_feature_check(GNU_POSIX_REGEX ${EXTRA_CXX_FLAGS})
-cxx_feature_check(POSIX_REGEX ${EXTRA_CXX_FLAGS})
+cxx_feature_check(STD_REGEX)
+cxx_feature_check(GNU_POSIX_REGEX)
+cxx_feature_check(POSIX_REGEX)
 if(NOT HAVE_STD_REGEX AND NOT HAVE_GNU_POSIX_REGEX AND NOT HAVE_POSIX_REGEX)
   message(FATAL_ERROR "Failed to determine the source files for the regular expression backend")
 endif()
diff --git a/README.md b/README.md
index b30e57cfd3..4e730256b6 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ IRC channels:
 
 ## Requirements
 
-The library can be used with C++03. However, it requires C++14 to build,
+The library can be used with C++11. However, it requires C++17 to build,
 including compiler and standard library support.
 
 _See [dependencies.md](docs/dependencies.md) for more details regarding supported
@@ -190,7 +190,7 @@ be under the build directory you created.
 ```bash
 # Example on linux after running the build steps above. Assumes the
 # `benchmark` and `build` directories are under the current directory.
-$ g++ mybenchmark.cc -std=c++14 -isystem benchmark/include \
+$ g++ mybenchmark.cc -std=c++11 -isystem benchmark/include \
   -Lbenchmark/build/src -lbenchmark -lpthread -o mybenchmark
 ```
 
diff --git a/docs/user_guide.md b/docs/user_guide.md
index 315276277b..b3c1cce8da 100644
--- a/docs/user_guide.md
+++ b/docs/user_guide.md
@@ -462,7 +462,7 @@ BENCHMARK(BM_SetInsert)->Apply(CustomArguments);
 
 ### Passing Arbitrary Arguments to a Benchmark
 
-In C++11 it is possible to define a benchmark that takes an arbitrary number
+It is possible to define a benchmark that takes an arbitrary number
 of extra arguments. The `BENCHMARK_CAPTURE(func, test_case_name, ...args)`
 macro creates a benchmark that invokes `func`  with the `benchmark::State` as
 the first argument followed by the specified `args...`.
@@ -563,22 +563,19 @@ template <class Q> void BM_Sequential(benchmark::State& state) {
   state.SetBytesProcessed(
       static_cast<int64_t>(state.iterations())*state.range(0));
 }
-// C++03
-BENCHMARK_TEMPLATE(BM_Sequential, WaitQueue<int>)->Range(1<<0, 1<<10);
 
-// C++11 or newer, you can use the BENCHMARK macro with template parameters:
+// You can use the BENCHMARK macro with template parameters:
 BENCHMARK(BM_Sequential<WaitQueue<int>>)->Range(1<<0, 1<<10);
 
+// Old, legacy verbose C++03 syntax:
+BENCHMARK_TEMPLATE(BM_Sequential, WaitQueue<int>)->Range(1<<0, 1<<10);
+
 ```
 
 Three macros are provided for adding benchmark templates.
 
 ```c++
-#ifdef BENCHMARK_HAS_CXX11
 #define BENCHMARK(func<...>) // Takes any number of parameters.
-#else // C++ < C++11
-#define BENCHMARK_TEMPLATE(func, arg1)
-#endif
 #define BENCHMARK_TEMPLATE1(func, arg1)
 #define BENCHMARK_TEMPLATE2(func, arg1, arg2)
 ```
@@ -740,12 +737,10 @@ is 1k a 1000 (default, `benchmark::Counter::OneK::kIs1000`), or 1024
   state.counters["BytesProcessed"] = Counter(state.range(0), benchmark::Counter::kIsIterationInvariantRate, benchmark::Counter::OneK::kIs1024);
 ```
 
-When you're compiling in C++11 mode or later you can use `insert()` with
-`std::initializer_list`:
+You can use `insert()` with `std::initializer_list`:
 
 <!-- {% raw %} -->
 ```c++
-  // With C++11, this can be done:
   state.counters.insert({{"Foo", numFoos}, {"Bar", numBars}, {"Baz", numBazs}});
   // ... instead of:
   state.counters["Foo"] = numFoos;
@@ -1249,7 +1244,7 @@ static void BM_test_ranged_fo(benchmark::State & state) {
 
 ## A Faster KeepRunning Loop
 
-In C++11 mode, a ranged-based for loop should be used in preference to
+A ranged-based for loop should be used in preference to
 the `KeepRunning` loop for running the benchmarks. For example:
 
 ```c++
diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h
index 663953de99..c9a758bc47 100644
--- a/include/benchmark/benchmark.h
+++ b/include/benchmark/benchmark.h
@@ -191,6 +191,14 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
   TypeName(const TypeName&) = delete;                \
   TypeName& operator=(const TypeName&) = delete
 
+#ifdef BENCHMARK_HAS_CXX17
+#define BENCHMARK_UNUSED [[maybe_unused]]
+#elif defined(__GNUC__) || defined(__clang__)
+#define BENCHMARK_UNUSED __attribute__((unused))
+#else
+#define BENCHMARK_UNUSED
+#endif
+
 // Used to annotate functions, methods and classes so they
 // are not optimized by the compiler. Useful for tests
 // where you expect loops to stay in place churning cycles
@@ -303,6 +311,18 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
 #endif  // _MSC_VER_
 
 namespace benchmark {
+
+namespace internal {
+#if (__cplusplus < 201402L || (defined(_MSC_VER) && _MSVC_LANG < 201402L))
+template <typename T, typename... Args>
+std::unique_ptr<T> make_unique(Args&&... args) {
+  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}
+#else
+using ::std::make_unique;
+#endif
+}  // namespace internal
+
 class BenchmarkReporter;
 class State;
 
@@ -472,7 +492,7 @@ BENCHMARK_EXPORT Benchmark* RegisterBenchmarkInternal(
 
 // Ensure that the standard streams are properly initialized in every TU.
 BENCHMARK_EXPORT int InitializeStreams();
-[[maybe_unused]] static int stream_init_anchor = InitializeStreams();
+BENCHMARK_UNUSED static int stream_init_anchor = InitializeStreams();
 
 }  // namespace internal
 
@@ -1026,7 +1046,7 @@ inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunningInternal(IterationCount n,
 }
 
 struct State::StateIterator {
-  struct [[maybe_unused]] Value {};
+  struct BENCHMARK_UNUSED Value {};
   typedef std::forward_iterator_tag iterator_category;
   typedef Value value_type;
   typedef Value reference;
@@ -1371,7 +1391,7 @@ class LambdaBenchmark : public Benchmark {
 inline internal::Benchmark* RegisterBenchmark(const std::string& name,
                                               internal::Function* fn) {
   return internal::RegisterBenchmarkInternal(
-      std::make_unique<internal::FunctionBenchmark>(name, fn));
+      benchmark::internal::make_unique<internal::FunctionBenchmark>(name, fn));
 }
 
 template <class Lambda>
@@ -1379,19 +1399,16 @@ internal::Benchmark* RegisterBenchmark(const std::string& name, Lambda&& fn) {
   using BenchType =
       internal::LambdaBenchmark<typename std::decay<Lambda>::type>;
   return internal::RegisterBenchmarkInternal(
-      std::make_unique<BenchType>(name, std::forward<Lambda>(fn)));
+      benchmark::internal::make_unique<BenchType>(name,
+                                                  std::forward<Lambda>(fn)));
 }
 
-#if (!defined(BENCHMARK_GCC_VERSION) || BENCHMARK_GCC_VERSION >= 409)
 template <class Lambda, class... Args>
 internal::Benchmark* RegisterBenchmark(const std::string& name, Lambda&& fn,
                                        Args&&... args) {
   return benchmark::RegisterBenchmark(
       name, [=](benchmark::State& st) { fn(st, args...); });
 }
-#else
-#define BENCHMARK_HAS_NO_VARIADIC_REGISTER_BENCHMARK
-#endif
 
 // The base class for all fixture tests.
 class Fixture : public internal::Benchmark {
@@ -1442,13 +1459,14 @@ class Fixture : public internal::Benchmark {
 #define BENCHMARK_PRIVATE_DECLARE(n)                                           \
   /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */                           \
   static ::benchmark::internal::Benchmark const* const BENCHMARK_PRIVATE_NAME( \
-      n) [[maybe_unused]]
+      n) BENCHMARK_UNUSED
 
 #define BENCHMARK(...)                                                \
   BENCHMARK_PRIVATE_DECLARE(_benchmark_) =                            \
       (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #__VA_ARGS__, __VA_ARGS__)))
+          benchmark::internal::make_unique<                           \
+              ::benchmark::internal::FunctionBenchmark>(#__VA_ARGS__, \
+                                                        __VA_ARGS__)))
 
 // Old-style macros
 #define BENCHMARK_WITH_ARG(n, a) BENCHMARK(n)->Arg((a))
@@ -1469,11 +1487,12 @@ class Fixture : public internal::Benchmark {
 //}
 // /* Registers a benchmark named "BM_takes_args/int_string_test` */
 // BENCHMARK_CAPTURE(BM_takes_args, int_string_test, 42, std::string("abc"));
-#define BENCHMARK_CAPTURE(func, test_case_name, ...)                  \
-  BENCHMARK_PRIVATE_DECLARE(_benchmark_) =                            \
-      (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #func "/" #test_case_name,                              \
+#define BENCHMARK_CAPTURE(func, test_case_name, ...)     \
+  BENCHMARK_PRIVATE_DECLARE(_benchmark_) =               \
+      (::benchmark::internal::RegisterBenchmarkInternal( \
+          benchmark::internal::make_unique<              \
+              ::benchmark::internal::FunctionBenchmark>( \
+              #func "/" #test_case_name,                 \
               [](::benchmark::State& st) { func(st, __VA_ARGS__); })))
 
 // This will register a benchmark for a templatized function.  For example:
@@ -1484,22 +1503,24 @@ class Fixture : public internal::Benchmark {
 // BENCHMARK_TEMPLATE(BM_Foo, 1);
 //
 // will register BM_Foo<1> as a benchmark.
-#define BENCHMARK_TEMPLATE1(n, a)                                     \
-  BENCHMARK_PRIVATE_DECLARE(n) =                                      \
-      (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #n "<" #a ">", n<a>)))
-
-#define BENCHMARK_TEMPLATE2(n, a, b)                                  \
-  BENCHMARK_PRIVATE_DECLARE(n) =                                      \
-      (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #n "<" #a "," #b ">", n<a, b>)))
-
-#define BENCHMARK_TEMPLATE(n, ...)                                    \
-  BENCHMARK_PRIVATE_DECLARE(n) =                                      \
-      (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
+#define BENCHMARK_TEMPLATE1(n, a)                        \
+  BENCHMARK_PRIVATE_DECLARE(n) =                         \
+      (::benchmark::internal::RegisterBenchmarkInternal( \
+          benchmark::internal::make_unique<              \
+              ::benchmark::internal::FunctionBenchmark>(#n "<" #a ">", n<a>)))
+
+#define BENCHMARK_TEMPLATE2(n, a, b)                                          \
+  BENCHMARK_PRIVATE_DECLARE(n) =                                              \
+      (::benchmark::internal::RegisterBenchmarkInternal(                      \
+          benchmark::internal::make_unique<                                   \
+              ::benchmark::internal::FunctionBenchmark>(#n "<" #a "," #b ">", \
+                                                        n<a, b>)))
+
+#define BENCHMARK_TEMPLATE(n, ...)                       \
+  BENCHMARK_PRIVATE_DECLARE(n) =                         \
+      (::benchmark::internal::RegisterBenchmarkInternal( \
+          benchmark::internal::make_unique<              \
+              ::benchmark::internal::FunctionBenchmark>( \
               #n "<" #__VA_ARGS__ ">", n<__VA_ARGS__>)))
 
 // This will register a benchmark for a templatized function,
@@ -1517,12 +1538,13 @@ class Fixture : public internal::Benchmark {
 #define BENCHMARK_TEMPLATE1_CAPTURE(func, a, test_case_name, ...) \
   BENCHMARK_CAPTURE(func<a>, test_case_name, __VA_ARGS__)
 
-#define BENCHMARK_TEMPLATE2_CAPTURE(func, a, b, test_case_name, ...)  \
-  BENCHMARK_PRIVATE_DECLARE(func) =                                   \
-      (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #func "<" #a "," #b ">"                                 \
-                    "/" #test_case_name,                              \
+#define BENCHMARK_TEMPLATE2_CAPTURE(func, a, b, test_case_name, ...) \
+  BENCHMARK_PRIVATE_DECLARE(func) =                                  \
+      (::benchmark::internal::RegisterBenchmarkInternal(             \
+          benchmark::internal::make_unique<                          \
+              ::benchmark::internal::FunctionBenchmark>(             \
+              #func "<" #a "," #b ">"                                \
+                    "/" #test_case_name,                             \
               [](::benchmark::State& st) { func<a, b>(st, __VA_ARGS__); })))
 
 #define BENCHMARK_PRIVATE_DECLARE_F(BaseClass, Method)        \
@@ -1591,7 +1613,7 @@ class Fixture : public internal::Benchmark {
 #define BENCHMARK_PRIVATE_REGISTER_F(TestName)           \
   BENCHMARK_PRIVATE_DECLARE(TestName) =                  \
       (::benchmark::internal::RegisterBenchmarkInternal( \
-          std::make_unique<TestName>()))
+          benchmark::internal::make_unique<TestName>()))
 
 // This macro will define and register a benchmark within a fixture class.
 #define BENCHMARK_F(BaseClass, Method)           \
diff --git a/test/BUILD b/test/BUILD
index e3558a94d6..9a26970672 100644
--- a/test/BUILD
+++ b/test/BUILD
@@ -102,11 +102,27 @@ cc_library(
         ["*_test.cc"],
         exclude = [
             "*_assembly_test.cc",
+            "cxx11_test.cc",
             "link_main_test.cc",
         ],
     )
 ]
 
+cc_test(
+    name = "cxx11_test",
+    size = "small",
+    srcs = ["cxx11_test.cc"],
+    copts = TEST_COPTS + ["-std=c++11"],
+    target_compatible_with = select({
+        "//:windows": ["@platforms//:incompatible"],
+        "//conditions:default": [],
+    }),
+    deps = [
+        ":output_test_helper",
+        "//:benchmark_main",
+    ],
+)
+
 cc_test(
     name = "link_main_test",
     size = "small",
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a7e7122dd2..df575d9be1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -73,6 +73,18 @@ macro(benchmark_add_test)
 endmacro(benchmark_add_test)
 
 # Demonstration executable
+
+compile_benchmark_test_with_main(cxx11_test)
+if(DEFINED MSVC)
+  # MSVC does not really support C++11.
+  set_property(TARGET cxx11_test PROPERTY CXX_STANDARD 14)
+else()
+  set_property(TARGET cxx11_test PROPERTY CXX_STANDARD 11)
+endif()
+set_property(TARGET cxx11_test PROPERTY CXX_STANDARD_REQUIRED ON)
+set_property(TARGET cxx11_test PROPERTY CXX_EXTENSIONS OFF)
+benchmark_add_test(NAME cxx11_test COMMAND cxx11_test --benchmark_min_time=0.01s)
+
 compile_benchmark_test(benchmark_test)
 benchmark_add_test(NAME benchmark COMMAND benchmark_test --benchmark_min_time=0.01s)
 
diff --git a/test/basic_test.cc b/test/basic_test.cc
index c3ac4946d8..b51494bdc4 100644
--- a/test/basic_test.cc
+++ b/test/basic_test.cc
@@ -143,7 +143,6 @@ void BM_RangedFor(benchmark::State& state) {
 }
 BENCHMARK(BM_RangedFor);
 
-#ifdef BENCHMARK_HAS_CXX11
 template <typename T>
 void BM_OneTemplateFunc(benchmark::State& state) {
   auto arg = state.range(0);
@@ -168,8 +167,6 @@ void BM_TwoTemplateFunc(benchmark::State& state) {
 BENCHMARK(BM_TwoTemplateFunc<int, double>)->Arg(1);
 BENCHMARK(BM_TwoTemplateFunc<double, int>)->Arg(1);
 
-#endif  // BENCHMARK_HAS_CXX11
-
 // Ensure that StateIterator provides all the necessary typedefs required to
 // instantiate std::iterator_traits.
 static_assert(
diff --git a/test/benchmark_test.cc b/test/benchmark_test.cc
index e00f153527..141f286fea 100644
--- a/test/benchmark_test.cc
+++ b/test/benchmark_test.cc
@@ -131,9 +131,7 @@ BENCHMARK_TEMPLATE2(BM_Sequential, std::vector<int>, int)
     ->Range(1 << 0, 1 << 10);
 BENCHMARK_TEMPLATE(BM_Sequential, std::list<int>)->Range(1 << 0, 1 << 10);
 // Test the variadic version of BENCHMARK_TEMPLATE in C++11 and beyond.
-#ifdef BENCHMARK_HAS_CXX11
 BENCHMARK_TEMPLATE(BM_Sequential, std::vector<int>, int)->Arg(512);
-#endif
 
 static void BM_StringCompare(benchmark::State& state) {
   size_t len = static_cast<size_t>(state.range(0));
@@ -225,8 +223,6 @@ static void BM_ManualTiming(benchmark::State& state) {
 BENCHMARK(BM_ManualTiming)->Range(1, 1 << 14)->UseRealTime();
 BENCHMARK(BM_ManualTiming)->Range(1, 1 << 14)->UseManualTime();
 
-#ifdef BENCHMARK_HAS_CXX11
-
 template <class... Args>
 void BM_with_args(benchmark::State& state, Args&&...) {
   for (auto _ : state) {
@@ -267,8 +263,6 @@ void BM_template1_capture(benchmark::State& state, ExtraArgs&&... extra_args) {
 BENCHMARK_TEMPLATE1_CAPTURE(BM_template1_capture, void, foo, 24UL);
 BENCHMARK_CAPTURE(BM_template1_capture<void>, foo, 24UL);
 
-#endif  // BENCHMARK_HAS_CXX11
-
 static void BM_DenseThreadRanges(benchmark::State& st) {
   switch (st.range(0)) {
     case 1:
diff --git a/test/cxx11_test.cc b/test/cxx11_test.cc
new file mode 100644
index 0000000000..db1a993343
--- /dev/null
+++ b/test/cxx11_test.cc
@@ -0,0 +1,12 @@
+#include "benchmark/benchmark.h"
+
+#if defined(_MSC_VER)
+#if _MSVC_LANG != 201402L
+// MSVC, even in C++11 mode, dooes not claim to be in C++11 mode.
+#error "Trying to compile C++11 test with wrong C++ standard"
+#endif  //  _MSVC_LANG
+#else   // Non-MSVC
+#if __cplusplus != 201103L
+#error "Trying to compile C++11 test with wrong C++ standard"
+#endif  // Non-MSVC
+#endif
diff --git a/test/donotoptimize_test.cc b/test/donotoptimize_test.cc
index 75db934b97..5c9a4583de 100644
--- a/test/donotoptimize_test.cc
+++ b/test/donotoptimize_test.cc
@@ -62,8 +62,6 @@ int main(int /*unused*/, char* /*unused*/[]) {
   BitRef lval = BitRef::Make();
   benchmark::DoNotOptimize(lval);
 
-#ifdef BENCHMARK_HAS_CXX11
   // Check that accept rvalue.
   benchmark::DoNotOptimize(BitRef::Make());
-#endif
 }
diff --git a/test/register_benchmark_test.cc b/test/register_benchmark_test.cc
index e443ab723f..1a188142de 100644
--- a/test/register_benchmark_test.cc
+++ b/test/register_benchmark_test.cc
@@ -77,7 +77,6 @@ ADD_CASES({"BM_function"}, {"BM_function_manual_registration"});
 // Note: GCC <= 4.8 do not support this form of RegisterBenchmark because they
 //       reject the variadic pack expansion of lambda captures.
 //----------------------------------------------------------------------------//
-#ifndef BENCHMARK_HAS_NO_VARIADIC_REGISTER_BENCHMARK
 
 void BM_extra_args(benchmark::State& st, const char* label) {
   for (auto _ : st) {
@@ -95,8 +94,6 @@ int RegisterFromFunction() {
 const int dummy2 = RegisterFromFunction();
 ADD_CASES({"test1", "One"}, {"test2", "Two"}, {"test3", "Three"});
 
-#endif  // BENCHMARK_HAS_NO_VARIADIC_REGISTER_BENCHMARK
-
 //----------------------------------------------------------------------------//
 // Test RegisterBenchmark with DISABLED_ benchmark
 //----------------------------------------------------------------------------//
@@ -121,14 +118,11 @@ struct CustomFixture {
 };
 
 void TestRegistrationAtRuntime() {
-#ifdef BENCHMARK_HAS_CXX11
   {
     CustomFixture fx;
     benchmark::RegisterBenchmark("custom_fixture", fx);
     AddCases({std::string("custom_fixture")});
   }
-#endif
-#ifndef BENCHMARK_HAS_NO_VARIADIC_REGISTER_BENCHMARK
   {
     const char* x = "42";
     auto capturing_lam = [=](benchmark::State& st) {
@@ -139,7 +133,6 @@ void TestRegistrationAtRuntime() {
     benchmark::RegisterBenchmark("lambda_benchmark", capturing_lam);
     AddCases({{"lambda_benchmark", x}});
   }
-#endif
 }
 
 // Test that all benchmarks, registered at either during static init or runtime,


Reviews:
user: login: dmah42
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T10:12:17Z
user: login: dmah42
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T10:13:13Z
user: login: dmah42
body: thank you so much for finishing this off!
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-03-14T10:14:01Z
user: login: LebedevRI
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-14T18:12:16Z
user: login: GitSparTV
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-15T10:48:24Z
user: login: dmah42
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-17T09:17:50Z
user: login: dmah42
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-17T09:18:09Z
user: login: pitrou
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-26T11:02:21Z
user: login: pitrou
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-26T12:23:10Z

Review comments:
diff_hunk: @@ -1249,7 +1244,7 @@ static void BM_test_ranged_fo(benchmark::State & state) {
 
 ## A Faster KeepRunning Loop
 
-In C++11 mode, a ranged-based for loop should be used in preference to
+Nowadays, a ranged-based for loop should be used in preference to
path: docs/user_guide.md
user: login: dmah42
body: nit: just "A ranged-based for loop should be..."
created_at: 2025-03-14T10:12:17Z
author_association: MEMBER
diff_hunk: @@ -191,6 +191,14 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
   TypeName(const TypeName&) = delete;                \
   TypeName& operator=(const TypeName&) = delete
 
+#ifdef BENCHMARK_HAS_CXX17
+#define BENCHMARK_UNUSED [[maybe_unused]]
+#elif defined(__GNUC__) || defined(__clang__)
+#define BENCHMARK_UNUSED __attribute__((unused))
+#else
+#define BENCHMARK_UNUSED
path: include/benchmark/benchmark.h
user: login: dmah42
body: does this mean we only need C++11 to use the library?
created_at: 2025-03-14T10:13:12Z
author_association: MEMBER
diff_hunk: @@ -191,6 +191,14 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
   TypeName(const TypeName&) = delete;                \
   TypeName& operator=(const TypeName&) = delete
 
+#ifdef BENCHMARK_HAS_CXX17
+#define BENCHMARK_UNUSED [[maybe_unused]]
+#elif defined(__GNUC__) || defined(__clang__)
+#define BENCHMARK_UNUSED __attribute__((unused))
+#else
+#define BENCHMARK_UNUSED
path: include/benchmark/benchmark.h
user: login: LebedevRI
body: No:
```
FAILED: test/CMakeFiles/cxx14_test.dir/cxx14_test.cc.o 
/usr/bin/c++ -DBENCHMARK_STATIC_DEFINE -DHAVE_POSIX_REGEX -DHAVE_PTHREAD_AFFINITY -DHAVE_STD_REGEX -DHAVE_STEADY_CLOCK -DTEST_BENCHMARK_LIBRARY_HAS_NO_ASSERTIONS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/tmp/benchmark/include -pipe  -Wall  -Wextra  -Wshadow  -Wfloat-equal  -Wold-style-cast  -Wconversion  -Werror  -pedantic  -pedantic-errors  -fstrict-aliasing  -Wno-deprecated-declarations  -Wno-deprecated  -Wstrict-aliasing  -Wno-unused-variable -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden   -UNDEBUG -MD -MT test/CMakeFiles/cxx14_test.dir/cxx14_test.cc.o -MF test/CMakeFiles/cxx14_test.dir/cxx14_test.cc.o.d -o test/CMakeFiles/cxx14_test.dir/cxx14_test.cc.o -c /tmp/benchmark/test/cxx14_test.cc
In file included from /tmp/benchmark/test/cxx14_test.cc:1:
/tmp/benchmark/include/benchmark/benchmark.h: In function ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const std::string&, void (*)(State&))’:
/tmp/benchmark/include/benchmark/benchmark.h:1382:12: error: ‘make_unique’ is not a member of ‘std’
 1382 |       std::make_unique<internal::FunctionBenchmark>(name, fn));
      |            ^~~~~~~~~~~
/tmp/benchmark/include/benchmark/benchmark.h:1382:12: note: ‘std::make_unique’ is only available from C++14 onwards
/tmp/benchmark/include/benchmark/benchmark.h:1382:51: error: expected primary-expression before ‘>’ token
 1382 |       std::make_unique<internal::FunctionBenchmark>(name, fn));
      |                                                   ^
/tmp/benchmark/include/benchmark/benchmark.h:1382:53: error: left operand of comma operator has no effect [-Werror=unused-value]
 1382 |       std::make_unique<internal::FunctionBenchmark>(name, fn));
      |                                                     ^~~~
/tmp/benchmark/include/benchmark/benchmark.h: In function ‘benchmark::internal::Benchmark* benchmark::RegisterBenchmark(const std::string&, Lambda&&)’:
/tmp/benchmark/include/benchmark/benchmark.h:1390:12: error: ‘make_unique’ is not a member of ‘std’
 1390 |       std::make_unique<BenchType>(name, std::forward<Lambda>(fn)));
      |            ^~~~~~~~~~~
/tmp/benchmark/include/benchmark/benchmark.h:1390:12: note: ‘std::make_unique’ is only available from C++14 onwards
/tmp/benchmark/include/benchmark/benchmark.h:1390:33: error: expected primary-expression before ‘>’ token
 1390 |       std::make_unique<BenchType>(name, std::forward<Lambda>(fn)));
      |                                 ^
```
Do we want to keep C++11 support?
created_at: 2025-03-14T18:12:16Z
author_association: COLLABORATOR
diff_hunk: @@ -190,7 +190,7 @@ be under the build directory you created.
 ```bash
 # Example on linux after running the build steps above. Assumes the
 # `benchmark` and `build` directories are under the current directory.
-$ g++ mybenchmark.cc -std=c++14 -isystem benchmark/include \
+$ g++ mybenchmark.cc -std=C++11 -isystem benchmark/include \
path: README.md
user: login: GitSparTV
body: We use lowercase `c`, don't we?
created_at: 2025-03-15T10:48:23Z
author_association: NONE
diff_hunk: @@ -191,6 +191,14 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
   TypeName(const TypeName&) = delete;                \
   TypeName& operator=(const TypeName&) = delete
 
+#ifdef BENCHMARK_HAS_CXX17
+#define BENCHMARK_UNUSED [[maybe_unused]]
+#elif defined(__GNUC__) || defined(__clang__)
+#define BENCHMARK_UNUSED __attribute__((unused))
+#else
+#define BENCHMARK_UNUSED
path: include/benchmark/benchmark.h
user: login: dmah42
body: no we don't need C++11 support any more.
created_at: 2025-03-17T09:17:49Z
author_association: MEMBER
diff_hunk: @@ -1442,13 +1459,14 @@ class Fixture : public internal::Benchmark {
 #define BENCHMARK_PRIVATE_DECLARE(n)                                           \
   /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */                           \
   static ::benchmark::internal::Benchmark const* const BENCHMARK_PRIVATE_NAME( \
-      n) [[maybe_unused]]
+      n) BENCHMARK_UNUSED
 
 #define BENCHMARK(...)                                                \
   BENCHMARK_PRIVATE_DECLARE(_benchmark_) =                            \
       (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #__VA_ARGS__, __VA_ARGS__)))
+          benchmark::internal::make_unique<                           \
+              ::benchmark::internal::FunctionBenchmark>(#__VA_ARGS__, \
+                                                        __VA_ARGS__)))
path: include/benchmark/benchmark.h
user: login: pitrou
body: I think there's a bug here: the macros should call `::benchmark::internal::make_unique` not `benchmark::internal::make_unique`.

We're now getting [compilation failures](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/builds/937#0195d209-e346-4c84-8895-b82b61d1a899/95-2687) because of this, example:
```
/var/lib/buildkite-agent/builds/amd64-c6a-4xlarge-linux-i-0a326a82268fb1cf0-1/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/arrow/cpp/src/parquet/page_index_benchmark.cc:60:1: error: 'parquet::benchmark::internal' has not been declared
   60 | BENCHMARK(BM_ReadOffsetIndex)->Apply(PageIndexSetArgs);
      | ^~~~~~~~~
```

created_at: 2025-03-26T11:02:20Z
author_association: NONE
diff_hunk: @@ -1442,13 +1459,14 @@ class Fixture : public internal::Benchmark {
 #define BENCHMARK_PRIVATE_DECLARE(n)                                           \
   /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */                           \
   static ::benchmark::internal::Benchmark const* const BENCHMARK_PRIVATE_NAME( \
-      n) [[maybe_unused]]
+      n) BENCHMARK_UNUSED
 
 #define BENCHMARK(...)                                                \
   BENCHMARK_PRIVATE_DECLARE(_benchmark_) =                            \
       (::benchmark::internal::RegisterBenchmarkInternal(              \
-          std::make_unique<::benchmark::internal::FunctionBenchmark>( \
-              #__VA_ARGS__, __VA_ARGS__)))
+          benchmark::internal::make_unique<                           \
+              ::benchmark::internal::FunctionBenchmark>(#__VA_ARGS__, \
+                                                        __VA_ARGS__)))
path: include/benchmark/benchmark.h
user: login: pitrou
body: I filed https://github.com/google/benchmark/issues/1959 for this
created_at: 2025-03-26T12:23:10Z
author_association: NONE

PR comments:
user: login: LebedevRI
created_at: 2025-03-17T15:44:00Z
body: @dmah42 thank you!
author_association: COLLABORATOR
user: login: pitrou
created_at: 2025-03-26T10:23:01Z
body: Hello,

The `::benchmark::internal::make_unique` hackery here seems to have [broken](https://github.com/apache/arrow/issues/45939) the Apache Arrow benchmark suite.

We have benchmark functions with the same name as functions in our public API. For example:
```c++
static void ExportType(benchmark::State& state) {  // NOLINT non-const reference
  struct ArrowSchema c_export;
  auto type = utf8();

  for (auto _ : state) {
    ABORT_NOT_OK(ExportType(*type, &c_export));
    ArrowSchemaRelease(&c_export);
  }
  state.SetItemsProcessed(state.iterations());
}
```

With these changes, it appears that the `make_unique` invocation can't resolve the type of its argument.
```
/var/lib/buildkite-agent/builds/amd64-c6a-4xlarge-linux-i-07da8a39d33d00b77-1/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/arrow/cpp/src/arrow/c/bridge_benchmark.cc:149:1: error: no matching function for call to 'make_unique<benchmark::internal::FunctionBenchmark>(const char [11], <unresolved overloaded function type>)'
  149 | BENCHMARK(ExportType);
      | ^~~~~~~~~
In file included from /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/memory:78,
                 from /var/lib/buildkite-agent/.conda/envs/arrow-commit/include/benchmark/benchmark.h:177:
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5: note: candidate: 'template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...)' (deleted)
 1094 |     make_unique(_Args&&...) = delete;
      |     ^~~~~~~~~~~
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5: note:   template argument deduction/substitution failed:
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h: In substitution of 'template<class _Tp> using std::__detail::__invalid_make_unique_t = typename std::__detail::_MakeUniq::__invalid_type [with _Tp = benchmark::internal::FunctionBenchmark]':
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5:   required by substitution of 'template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = benchmark::internal::FunctionBenchmark; _Args = <missing>]'
/var/lib/buildkite-agent/builds/amd64-c6a-4xlarge-linux-i-07da8a39d33d00b77-1/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/arrow/cpp/src/arrow/c/bridge_benchmark.cc:149:1:   required from here
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1055:11: error: no type named '__invalid_type' in 'struct std::__detail::_MakeUniq<benchmark::internal::FunctionBenchmark>'
 1055 |     using __invalid_make_unique_t = typename _MakeUniq<_Tp>::__invalid_type;
      |           ^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1084:5: note: candidate: 'template<class _Tp> std::__detail::__unique_ptr_array_t<_Tp> std::make_unique(size_t)'
 1084 |     make_unique(size_t __num)
      |     ^~~~~~~~~~~
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1084:5: note:   candidate expects 1 argument, 2 provided
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1069:5: note: candidate: 'std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = benchmark::internal::FunctionBenchmark; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<benchmark::internal::FunctionBenchmark>]'
 1069 |     make_unique(_Args&&... __args)
      |     ^~~~~~~~~~~
/var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1069:5: note:   candidate expects 0 arguments, 2 provided
```
(see full error log at https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/builds/932#0195d16c-04e9-4bb2-9cfd-4ec078cf7570/95-1582)


author_association: NONE
user: login: dmah42
created_at: 2025-03-26T10:27:04Z
body: > Hello,
> 
> The `::benchmark::internal::make_unique` hackery here seems to have [broken](https://github.com/apache/arrow/issues/45939) the Apache Arrow benchmark suite.
> 
> We have benchmark functions with the same name as functions in our public API. For example:
> 
> ```c++
> static void ExportType(benchmark::State& state) {  // NOLINT non-const reference
>   struct ArrowSchema c_export;
>   auto type = utf8();
> 
>   for (auto _ : state) {
>     ABORT_NOT_OK(ExportType(*type, &c_export));
>     ArrowSchemaRelease(&c_export);
>   }
>   state.SetItemsProcessed(state.iterations());
> }
> ```
> 
> With these changes, it appears that the `make_unique` invocation can't resolve the type of its argument.
> 
> ```
> /var/lib/buildkite-agent/builds/amd64-c6a-4xlarge-linux-i-07da8a39d33d00b77-1/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/arrow/cpp/src/arrow/c/bridge_benchmark.cc:149:1: error: no matching function for call to 'make_unique<benchmark::internal::FunctionBenchmark>(const char [11], <unresolved overloaded function type>)'
>   149 | BENCHMARK(ExportType);
>       | ^~~~~~~~~
> In file included from /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/memory:78,
>                  from /var/lib/buildkite-agent/.conda/envs/arrow-commit/include/benchmark/benchmark.h:177:
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5: note: candidate: 'template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...)' (deleted)
>  1094 |     make_unique(_Args&&...) = delete;
>       |     ^~~~~~~~~~~
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5: note:   template argument deduction/substitution failed:
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h: In substitution of 'template<class _Tp> using std::__detail::__invalid_make_unique_t = typename std::__detail::_MakeUniq::__invalid_type [with _Tp = benchmark::internal::FunctionBenchmark]':
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1094:5:   required by substitution of 'template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = benchmark::internal::FunctionBenchmark; _Args = <missing>]'
> /var/lib/buildkite-agent/builds/amd64-c6a-4xlarge-linux-i-07da8a39d33d00b77-1/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/arrow/cpp/src/arrow/c/bridge_benchmark.cc:149:1:   required from here
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1055:11: error: no type named '__invalid_type' in 'struct std::__detail::_MakeUniq<benchmark::internal::FunctionBenchmark>'
>  1055 |     using __invalid_make_unique_t = typename _MakeUniq<_Tp>::__invalid_type;
>       |           ^~~~~~~~~~~~~~~~~~~~~~~
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1084:5: note: candidate: 'template<class _Tp> std::__detail::__unique_ptr_array_t<_Tp> std::make_unique(size_t)'
>  1084 |     make_unique(size_t __num)
>       |     ^~~~~~~~~~~
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1084:5: note:   candidate expects 1 argument, 2 provided
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1069:5: note: candidate: 'std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = benchmark::internal::FunctionBenchmark; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<benchmark::internal::FunctionBenchmark>]'
>  1069 |     make_unique(_Args&&... __args)
>       |     ^~~~~~~~~~~
> /var/lib/buildkite-agent/.conda/envs/arrow-commit/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:1069:5: note:   candidate expects 0 arguments, 2 provided
> ```
> 
> (see full error log at https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-amd64-c6a-4xlarge-linux/builds/932#0195d16c-04e9-4bb2-9cfd-4ec078cf7570/95-1582)

if you rename the benchmark function to something like `ExportTypeBM`, does the build then succeed?
author_association: MEMBER
user: login: pitrou
created_at: 2025-03-26T10:36:52Z
body: > if you rename the benchmark function to something like `ExportTypeBM`, does the build then succeed?

Yes, it does, but we don't want to do that: it would break benchmark history. Instead I've opted to put the benchmark functions in a [dedicated namespace](https://github.com/apache/arrow/pull/45942).
author_association: NONE
user: login: dmah42
created_at: 2025-03-26T11:00:10Z
body: ah ok .. so it wouldn't help if we prepended something to the benchmark name within the library.  adding them to a namespace, even an unnamed one, works i guess because of name resolution rules.  i'm a bit surprised it didn't work anyway, given the locality of the benchmark function, but there is ambiguity.
author_association: MEMBER
user: login: pitrou
created_at: 2025-03-26T12:12:33Z
body: Oh, and we're getting yet another build regression on macOS with this kind of benchmark declaration:
```c++
template <typename InListType = ListType>
static void ListSliceInt64List(benchmark::State& state) {
  ListSliceOptions opts;
  opts.start = kSliceStart;
  BenchmarkListSlice(state, opts, std::make_shared<InListType>(int64()));
}

BENCHMARK(ListSliceInt64List)->Apply(RegressionSetArgs);
```
Error message:
```
/opt/homebrew/var/buildkite-agent/builds/test-mac-arm/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/arrow/cpp/src/arrow/compute/kernels/scalar_list_benchmark.cc:136:1: error: no matching function for call to 'make_unique'
  136 | BENCHMARK(ListSliceInt64List)->Apply(RegressionSetArgs);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/voltrondata/miniconda3/envs/arrow-commit/include/benchmark/benchmark.h:1467:11: note: expanded from macro 'BENCHMARK'
 1467 |           benchmark::internal::make_unique<                           \
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1468 |               ::benchmark::internal::FunctionBenchmark>(#__VA_ARGS__, \
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/voltrondata/miniconda3/envs/arrow-commit/bin/../include/c++/v1/__memory/unique_ptr.h:596:1: note: candidate template ignored: substitution failure [with _Tp = ::benchmark::internal::FunctionBenchmark]: deduced incomplete pack <const char (&)[19], (no value)> for template parameter '_Args'
  594 | template <class _Tp, class... _Args>
      |                               ~~~~~
  595 | inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_single
  596 | make_unique(_Args&&... __args) {
      | ^
/Users/voltrondata/miniconda3/envs/arrow-commit/bin/../include/c++/v1/__memory/unique_ptr.h:602:1: note: candidate function not viable: requires single argument '__n', but 2 arguments were provided
  602 | make_unique(size_t __n) {
      | ^           ~~~~~~~~~~
/Users/voltrondata/miniconda3/envs/arrow-commit/bin/../include/c++/v1/__memory/unique_ptr.h:608:55: note: candidate template ignored: substitution failure [with _Tp = ::benchmark::internal::FunctionBenchmark]: no type named '__unique_array_known_bound' in 'std::__unique_if<benchmark::internal::FunctionBenchmark>'
  608 | typename __unique_if<_Tp>::__unique_array_known_bound make_unique(_Args&&...) = delete;
      | ~~~~~~~~                                              ^
```

Full log at https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/6691#0195d221-7885-41a8-a884-e29c3dfdb219/34-1279
author_association: NONE