-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
Description
Describe the bug
single_include/catch2/catch.hpp appears to be missing some benchmarking symbols that appear in the docs. Others may also be missing.
Expected behavior
Compiling the example code should work:
TEST_CASE("BLAH")
{
BENCHMARK_ADVANCED("construct")(Catch::Benchmark::Chronometer meter)
{
std::vector<Catch::Benchmark::storage_for<std::string>> storage(meter.runs());
meter.measure([&](int i) { storage[i].construct("thing"); });
}
}
Observed behavior
error: storage_for is not a member of Catch::Benchmark
Reproduction steps
Compile the following:
#define CATCH_CONFIG_MAIN
#define CATCH_CONFIG_ENABLE_BENCHMARKING
#include <catch2/catch.hpp>
#include <vector>
#include <string>
TEST_CASE("BLAH")
{
BENCHMARK_ADVANCED("construct")(Catch::Benchmark::Chronometer meter)
{
std::vector<Catch::Benchmark::storage_for<std::string>> storage(meter.runs());
meter.measure([&](int i) { storage[i].construct("thing"); });
}
}
Platform information:
- Catch version: v2.10.2
Reactions are currently unavailable