teslamotors / fixed-containers

C++ Fixed Containers
MIT License
352 stars 31 forks source link

Fix benchmark builds for bazel #122

Closed alexkaratarakis closed 3 weeks ago

alexkaratarakis commented 3 weeks ago

https://github.com/google/benchmark/pull/1803

In file included from test/fixed_map_perf_test.cpp:4:
bazel-out/k8-fastbuild/bin/external/com_google_benchmark/_virtual_includes/benchmark_main/benchmark/benchmark.h:1801:25: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
 1801 |           memory_result(NULL),
      |                         ^~~~
      |                         nullptr
/usr/lib/llvm-17/lib/clang/17/include/stddef.h:84:18: note: expanded from macro 'NULL'
   84 | #    define NULL __null
      |                  ^
In file included from test/fixed_map_perf_test.cpp:4:
bazel-out/k8-fastbuild/bin/external/com_google_benchmark/_virtual_includes/benchmark_main/benchmark/benchmark.h:378:7: error: 'MemoryManager' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Werror,-Wweak-vtables]
  378 | class MemoryManager {
      |       ^
bazel-out/k8-fastbuild/bin/external/com_google_benchmark/_virtual_includes/benchmark_main/benchmark/benchmark.h:1437:7: error: 'Fixture' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Werror,-Wweak-vtables]
 1437 | class Fixture : public internal::Benchmark {
      |       ^
3 errors generated.