Skip to content

Commit

Permalink
fix: Make callable args universal references (acts-project#3789)
Browse files Browse the repository at this point in the history
Sonar flagged this
  • Loading branch information
paulgessinger authored and Rosie-Hasan committed Nov 13, 2024
1 parent 3d4c469 commit a3555e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/include/Acts/Utilities/DelegateChainBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class DelegateChainBuilder<R(callable_args...), TypeList<payload_types...>,

template <std::size_t I = 0, typename result_ptr>
static constexpr auto invoke(result_ptr result, const tuple_type* payloads,
callable_args... args) {
callable_args&&... args) {
const auto& callable = findCallable<I, 0, callables...>();

if constexpr (!std::is_same_v<std::tuple_element_t<I, tuple_type>,
Expand Down Expand Up @@ -134,7 +134,7 @@ class DelegateChainBuilder<R(callable_args...), TypeList<payload_types...>,

tuple_type m_payloads{};

auto dispatch(callable_args... args) const {
auto dispatch(callable_args&&... args) const {
if constexpr (std::is_same_v<R, void>) {
invoke(nullptr, &m_payloads, std::forward<callable_args>(args)...);
} else {
Expand Down

0 comments on commit a3555e1

Please sign in to comment.