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

Function do_not_optimize

example/benchmark.cpp:39–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37#if defined(__GNUC__) or defined(__clang__)
38template <class T>
39void do_not_optimize(T&& t) {
40 asm volatile("" ::"m"(t) : "memory");
41}
42#else
43#pragma optimize("", off)
44template <class T>

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected