From 967f4a17d82bb59f450b6053105b2a357adfc07b Mon Sep 17 00:00:00 2001 From: Thomas Hahn Date: Fri, 19 Jan 2024 18:09:33 -0500 Subject: [PATCH] Fix bug in clef evaluator --- c++/nda/clef/clef.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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{}; }