Skip to content

Commit

Permalink
Merge branch 'main' into feat/1695/add-logs-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored Jan 21, 2024
2 parents ecf117e + ff13fdd commit 3dc225e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/include/opentelemetry/nostd/function_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class function_ref<R(Args...)>
void BindTo(F &f) noexcept
{
callable_ = static_cast<void *>(std::addressof(f));
invoker_ = [](void *callable_, Args... args) -> R {
return (*static_cast<FunctionPointer<F>>(callable_))(std::forward<Args>(args)...);
invoker_ = [](void *callable, Args... args) -> R {
return (*static_cast<FunctionPointer<F>>(callable))(std::forward<Args>(args)...);
};
}

Expand All @@ -49,8 +49,8 @@ class function_ref<R(Args...)>
return BindTo(nullptr);
}
callable_ = reinterpret_cast<void *>(f);
invoker_ = [](void *callable_, Args... args) -> R {
return (F(callable_))(std::forward<Args>(args)...);
invoker_ = [](void *callable, Args... args) -> R {
return (F(callable))(std::forward<Args>(args)...);
};
}

Expand Down

0 comments on commit 3dc225e

Please sign in to comment.