Loading...
Searching...
No Matches
Catch::Benchmark::Detail::BenchmarkFunction Struct Reference

`#include <catch_amalgamated.hpp>`

Collaboration diagram for Catch::Benchmark::Detail::BenchmarkFunction:
[legend]

## 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

## Detailed Description

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.

## Constructor & Destructor Documentation

## BenchmarkFunction() [1/3]

Catch::Benchmark::Detail::BenchmarkFunction::BenchmarkFunction | ( |  | ) |

Here is the caller graph for this function:

## BenchmarkFunction() [2/3]

template<typename Fun, std::enable_if_t<!is_related< Fun, BenchmarkFunction >::value, int > = 0>

Catch::Benchmark::Detail::BenchmarkFunction::BenchmarkFunction | ( | Fun && | fun | ) |

inline

## BenchmarkFunction() [3/3]

Catch::Benchmark::Detail::BenchmarkFunction::BenchmarkFunction | ( | BenchmarkFunction && | that | ) |

inlinenoexcept

Here is the call graph for this function:

## Member Function Documentation

## operator()()

void Catch::Benchmark::Detail::BenchmarkFunction::operator() | ( | Chronometer | meter | ) | const

inline

## operator=()

BenchmarkFunction & Catch::Benchmark::Detail::BenchmarkFunction::operator= | ( | BenchmarkFunction && | that | ) |

inlinenoexcept

Here is the call graph for this function:

## Member Data Documentation

## f

Catch::Detail::unique_ptr<callable> Catch::Benchmark::Detail::BenchmarkFunction::f

private

The documentation for this struct was generated from the following files:

- tests/vendor/catch_amalgamated.hpp
- tests/vendor/catch_amalgamated.cpp