diff --git a/c++/nda/clef/clef.hpp b/c++/nda/clef/clef.hpp index 5a494e347..bdf23e985 100644 --- a/c++/nda/clef/clef.hpp +++ b/c++/nda/clef/clef.hpp @@ -356,7 +356,8 @@ namespace nda::clef { FORCEINLINE decltype(auto) operator()(placeholder, pair const &...pairs) const { if constexpr (not is_lazy) { // N is one of the Is - return std::get(std::tie(pairs...)).rhs; + auto const& res = std::get(std::tie(pairs...)).rhs; + return res; } else { // N is not one of the Is return placeholder{}; }