gdbsupport: add assertions in array_view
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 19 Oct 2021 19:32:08 +0000 (15:32 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 25 Oct 2021 18:51:44 +0000 (14:51 -0400)
commitd9f82e931394efed68858eb7c7bb5832ad888482
tree2c8d23aac0b396bcfe433a26f16c2d80e9650423
parent61d7f128e6ea37af805be4e365f5879b0d42bb93
gdbsupport: add assertions in array_view

Add assertions to ensure we don't access an array_view out of bounds.
Enable these assertions only when _GLIBCXX_DEBUG is set, as we did for
gdb::optional.

Change-Id: Iffaee38252405073735ed123c8e57fde6b2c6be3
gdbsupport/array-view.h