diff --git a/include/aare/NDView.hpp b/include/aare/NDView.hpp index c946c26..0aa4f78 100644 --- a/include/aare/NDView.hpp +++ b/include/aare/NDView.hpp @@ -35,6 +35,7 @@ Shape make_shape(const std::vector &shape) { */ template Shape drop_first_dim(const Shape &shape) { + static_assert(Ndim > 1, "Cannot drop first dimension from a 1D shape"); Shape new_shape; std::copy(shape.begin() + 1, shape.end(), new_shape.begin()); return new_shape;