#include <catch_amalgamated.hpp>
Classes | |
struct | callable |
struct | model |
Public Member Functions | |
BenchmarkFunction () | |
template<typename Fun, std::enable_if_t<!is_related< Fun, BenchmarkFunction >::value, int > = 0> | |
BenchmarkFunction (Fun &&fun) | |
BenchmarkFunction (BenchmarkFunction &&that) noexcept | |
BenchmarkFunction & | operator= (BenchmarkFunction &&that) noexcept |
void | operator() (Chronometer meter) const |
Private Attributes | |
Catch::Detail::unique_ptr< callable > | f |
We need to reinvent std::function because every piece of code that might add overhead in a measurement context needs to have consistent performance characteristics so that we can account for it in the measurement. Implementations of std::function with optimizations that aren't always applicable, like small buffer optimizations, are not uncommon. This is effectively an implementation of std::function without any such optimizations; it may be slow, but it is consistently slow.
Catch::Benchmark::Detail::BenchmarkFunction::BenchmarkFunction | ( | ) |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
private |