diff options
| author | Chris Webb <chris@arachsys.com> | 2023-12-10 10:58:42 +0000 |
|---|---|---|
| committer | Chris Webb <chris@arachsys.com> | 2023-12-10 10:58:42 +0000 |
| commit | 7b2772ef8988b8b4a24b57638cecf5ff00fe5219 (patch) | |
| tree | ae4044d2dda084cdd2e0bf41c2e759e710f65406 /src/display_buffer.hh | |
| parent | ee8c74c72444dbb53252163d9785e456e88d8965 (diff) | |
Change use of deprecated '->' operator on an iterator
In display_buffer.hh, the '->' operator is used on an iterator, but
(surprisingly) this is deprecated from C++20 because of x-value vs
l-value ambiguity. Now clang's -Wdeprecated-declarations warns about it
as we declare -std=c++2a. See
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1252r2.pdf
which was adopted for 2019-03.
Diffstat (limited to 'src/display_buffer.hh')
| -rw-r--r-- | src/display_buffer.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh index 0fef5258..c13bd0b9 100644 --- a/src/display_buffer.hh +++ b/src/display_buffer.hh @@ -141,7 +141,7 @@ public: if (auto first = std::find_if(beg, end, has_buffer_range); first != end) { auto& last = *std::find_if(std::reverse_iterator(end), std::reverse_iterator(first), has_buffer_range); - m_range.begin = std::min(m_range.begin, first->begin()); + m_range.begin = std::min(m_range.begin, (*first).begin()); m_range.end = std::max(m_range.end, last.end()); } return m_atoms.insert(pos, beg, end); |
