diff options
author | Tom de Vries <tdevries@suse.de> | 2024-10-19 08:10:38 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-10-19 08:10:38 +0200 |
commit | 6c8052f6b22fbb6ae1edc759454626d465ee317c (patch) | |
tree | 7cde26a812c20d056625ba1f890dc62b3409f10b /gdb/unittests/array-view-selftests.c | |
parent | 3173529d7decb91711f19a06eee54475683a1783 (diff) | |
download | binutils-6c8052f6b22fbb6ae1edc759454626d465ee317c.zip binutils-6c8052f6b22fbb6ae1edc759454626d465ee317c.tar.gz binutils-6c8052f6b22fbb6ae1edc759454626d465ee317c.tar.bz2 |
[gdbsupport] Use std::span-style iterators for gdb::array_view
There's a plan to replace gdb::array_view with std::span (PR31422), and making
gdb::array_view more like std::span helps with that.
One difference is that std::span has:
...
constexpr iterator begin() const noexcept;
constexpr const_iterator cbegin() const noexcept;
...
while gdb::array_view has:
...
constexpr T *begin () noexcept;
constexpr const T *begin () const noexcept;
...
Fix this by renaming the second variant to cbegin, and making the first
variant const.
Likewise for gdb::array_view::end.
Tested on aarch64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/unittests/array-view-selftests.c')
0 files changed, 0 insertions, 0 deletions