MCPcopy Create free account
hub / github.com/boost-ext/ut / operator=

Method operator=

example/benchmark.cpp:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19 template <class Test>
20 auto operator=(Test _test) {
21 static_cast<boost::ut::detail::test&>(*this) = [&_test, this] {
22 const auto start = std::chrono::high_resolution_clock::now();
23 _test();
24 const auto stop = std::chrono::high_resolution_clock::now();
25 const auto ns =
26 std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);
27 std::clog << "[" << name << "] " << ns.count() << " ns\n";
28 };
29 }
30};
31
32[[nodiscard]] auto operator""_benchmark(const char* _name,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected