diff --git a/librapid/include/librapid/array/operations.hpp b/librapid/include/librapid/array/operations.hpp index ca0d3512..dd26bfdd 100644 --- a/librapid/include/librapid/array/operations.hpp +++ b/librapid/include/librapid/array/operations.hpp @@ -61,7 +61,7 @@ #define LIBRAPID_UNARY_SHAPE_EXTRACTOR \ template \ - LIBRAPID_NODISCARD static LIBRAPID_ALWAYS_INLINE auto getShape( \ + LIBRAPID_NODISCARD static LIBRAPID_ALWAYS_INLINE auto &getShape( \ const std::tuple &args) { \ static_assert(sizeof...(Args) == 1, "Invalid number of arguments for unary operation"); \ return std::get<0>(args).shape(); \ @@ -69,7 +69,7 @@ #define LIBRAPID_BINARY_SHAPE_EXTRACTOR \ template \ - LIBRAPID_NODISCARD static LIBRAPID_ALWAYS_INLINE auto getShapeImpl( \ + LIBRAPID_NODISCARD static LIBRAPID_ALWAYS_INLINE auto &getShapeImpl( \ const std::tuple &tup) { \ if constexpr (TypeInfo>::type != detail::LibRapidType::Scalar && \ TypeInfo>::type != detail::LibRapidType::Scalar) { \