File tree Expand file tree Collapse file tree
Core/include/Acts/Utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ std::array<value_t, kDIM> toArray(const std::vector<value_t>& vecvals) {
114114// / that is callable with @c Args
115115template <template <std::size_t > class Callable , std::size_t N,
116116 std::size_t NMAX , typename ... Args>
117- auto template_switch (std::size_t v, Args&&... args) {
117+ decltype ( auto ) template_switch(std::size_t v, Args&&... args) {
118118 if (v == N) {
119119 return Callable<N>::invoke (std::forward<Args>(args)...);
120120 }
@@ -141,7 +141,8 @@ auto template_switch(std::size_t v, Args&&... args) {
141141// / @param args Additional arguments passed to @p func
142142// / @return The result of calling the dispatched lambda function
143143template <std::size_t N, std::size_t NMAX , typename Lambda, typename ... Args>
144- auto template_switch_lambda (std::size_t v, Lambda&& func, Args&&... args) {
144+ decltype (auto ) template_switch_lambda(std::size_t v, Lambda&& func,
145+ Args&&... args) {
145146 if (v == N) {
146147 return func (std::integral_constant<std::size_t , N>{},
147148 std::forward<Args>(args)...);
You can’t perform that action at this time.
0 commit comments