diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2022-05-19 18:15:20 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2022-05-21 15:10:03 +0200 |
| commit | 1529cfb2c2ce2247747cce5eadcc93dcee570e0e (patch) | |
| tree | 594f5068ff37762bdbd9d856944ba370ce4fba1e /src/regex.hh | |
| parent | 4c7c4a1454804ea978c527abe59be56dca0a1629 (diff) | |
Stop using deprecated std::iterator
As reported in #4615 and others, GCC 12.1 emits deprecation warnings
because we use std::iterator. Replace it with the modern equivalent.
Closes #4615
Diffstat (limited to 'src/regex.hh')
| -rw-r--r-- | src/regex.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/regex.hh b/src/regex.hh index bd32f2d8..5b0ab7fc 100644 --- a/src/regex.hh +++ b/src/regex.hh @@ -45,8 +45,13 @@ struct MatchResults bool matched = false; }; - struct iterator : std::iterator<std::bidirectional_iterator_tag, SubMatch, size_t, SubMatch*, SubMatch> + struct iterator { + using difference_type = size_t; + using value_type = SubMatch; + using pointer = SubMatch*; + using reference = SubMatch; + using iterator_category = std::bidirectional_iterator_tag; using It = typename Vector<Iterator, MemoryDomain::Regex>::const_iterator; iterator() = default; |
