diff --git a/vectors.h b/vectors.h index 5486046b4..af0f557ec 100644 --- a/vectors.h +++ b/vectors.h @@ -16,7 +16,7 @@ // return the the magnitude of a vector template -[[nodiscard]] [[gnu::const]] constexpr auto vec_len(const std::array vec) -> double { +[[nodiscard]] constexpr auto vec_len(const std::array &vec) -> double { const double squaredlen = std::accumulate(vec.begin(), vec.end(), 0., [](auto a, auto b) { return a + b * b; }); return std::sqrt(squaredlen);