File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,11 +242,12 @@ bool TracingEnabled(Options const& options);
242242template <typename Rep, typename Period>
243243std::function<void (std::chrono::duration<Rep, Period>)> MakeTracedSleeper(
244244 Options const & options,
245- std::function<void (std::chrono::duration<Rep, Period>)> const & sleeper,
245+ std::function<void (std::chrono::duration<Rep, Period>)> sleeper,
246246 std::string const & name) {
247247#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY
248248 if (TracingEnabled (options)) {
249- return [=](std::chrono::duration<Rep, Period> d) {
249+ return [name, sleeper = std::move (sleeper)](
250+ std::chrono::duration<Rep, Period> d) {
250251 // A sleep of 0 is not an interesting event worth tracing.
251252 if (d == std::chrono::duration<Rep, Period>::zero ()) return sleeper (d);
252253 auto span = MakeSpan (name);
You can’t perform that action at this time.
0 commit comments