| 1014 | */ |
| 1015 | template <typename T, ssize_t Dims = -1> |
| 1016 | detail::unchecked_mutable_reference<T, Dims> mutable_unchecked() & { |
| 1017 | if (Dims >= 0 && ndim() != Dims) { |
| 1018 | throw std::domain_error("array has incorrect number of dimensions: " |
| 1019 | + std::to_string(ndim()) + "; expected " |
| 1020 | + std::to_string(Dims)); |
| 1021 | } |
| 1022 | return detail::unchecked_mutable_reference<T, Dims>( |
| 1023 | mutable_data(), shape(), strides(), ndim()); |
| 1024 | } |
| 1025 | |
| 1026 | /** |
| 1027 | * Returns a proxy object that provides const access to the array's data without bounds or |