We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ead43b commit 95e8160Copy full SHA for 95e8160
RTLBenchmarkApp/src/BenchMark.cpp
@@ -123,7 +123,7 @@ namespace rtl_bench
123
124
void BenchMark::lambdaCall_withReturn(benchmark::State& state)
125
{
126
- std::function getMsg = [](const char* pMsg) {
+ static std::function getMsg = [](const char* pMsg) {
127
return getMessage(pMsg);
128
};
129
@@ -136,7 +136,7 @@ namespace rtl_bench
136
137
void BenchMark::reflectedCall_withReturn(benchmark::State& state)
138
139
- rtl::Function getMsg = cxx_mirror().getFunction("getMessage").value();
+ static rtl::Function getMsg = cxx_mirror().getFunction("getMessage").value();
140
for (auto _ : state)
141
142
benchmark::DoNotOptimize(getMsg.bind<const char*>().call("reflected"));
0 commit comments