From 6cd93dbac127c843448a9239cef55e8d1ded54cc Mon Sep 17 00:00:00 2001 From: Felix Thaler Date: Tue, 29 Oct 2024 13:56:00 +0100 Subject: [PATCH] Allow reference return values of sid::as_const --- include/gridtools/fn/sid_neighbor_table.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gridtools/fn/sid_neighbor_table.hpp b/include/gridtools/fn/sid_neighbor_table.hpp index 453f453d3..b4dbd14fe 100644 --- a/include/gridtools/fn/sid_neighbor_table.hpp +++ b/include/gridtools/fn/sid_neighbor_table.hpp @@ -62,7 +62,7 @@ namespace gridtools::fn::sid_neighbor_table { static_assert(!std::is_same_v, "The index dimension and the neighbor dimension must be different."); - const auto const_sid = sid::as_const(std::forward(sid)); + decltype(auto) const_sid = sid::as_const(std::forward(sid)); const auto origin = sid::get_origin(const_sid); const auto strides = sid::get_strides(const_sid);