Closed czertyaka closed 2 years ago
Looks like a duplicate of #12
But since this is a frequent request, I've added an out of bounds check in dfb59ff6c7f285ebdff577e9dd2254d66db3964d.
Thanks a lot. My first reported issue, haven't figured out how it should work properly yet here on GitHub. I'll check previous issues more thoroughly next time :)
https://github.com/ddemidov/mba/blob/420bc7f4d0717a1f66eee05f61122ff2dd28d65a/mba/mba.hpp#L96-L110
Got SEGFAULT due to acessing values in
multi_array
viaoperator[]
. Somehow index appeared to be too large (still don't know how it happened).Propose to use
at()
here so we can catchstd::out_of_range
in such cases.