I am trying to understand and benchmark fmt::format API ( https://fmt.dev/latest/api.html ). I wrote a simple test in compiler explorer i.e, https://godbolt.org/z/fMcf3nczE.
#include <benchmark/benchmark.h>
#include <fmt/core.h>
static void BM_format(benchmark::State& state) {
// Perform setup here
for (auto _ : state)
{
std::string s = fmt::format( "{}", "testing fmt::format in benchmark");
}
}
// Register the function as a benchmark
BENCHMARK(BM_format);
// Run the benchmark
BENCHMARK_MAIN();
Then, I launched quick-bench from compile explorer. In quick-bench, it gives an error as
Error or timeout bench-file.cpp:2:10: fatal error: fmt/core.h: No such file or directory 2 | #include <fmt/core.h> | ^~~~~~~~~~~~ compilation terminated.
Is the c++ fmt library supported in quick-bench so that it compiles and executes? if not, any alternative.