diff --git a/include/nmtools/array/index/broadcast_to.hpp b/include/nmtools/array/index/broadcast_to.hpp index 14e095766..eb8864270 100644 --- a/include/nmtools/array/index/broadcast_to.hpp +++ b/include/nmtools/array/index/broadcast_to.hpp @@ -52,7 +52,7 @@ namespace nmtools::index::impl >; auto ret = result_t {}; - auto dim = len(bshape); + [[maybe_unused]] auto dim = len(bshape); if constexpr (meta::is_resizable_v) { ret.resize(dim);