Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
1c97793b
Commit
1c97793b
authored
Jul 19, 2021
by
Max Kellermann
Committed by
Max Kellermann
Oct 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/IntrusiveList: do not use the deprecated class std::iterator
Deprecated in C++17. Since C++17, one is supposed to declare those 5 types manually.
parent
4dae8b41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
IntrusiveList.hxx
src/util/IntrusiveList.hxx
+14
-6
No files found.
src/util/IntrusiveList.hxx
View file @
1c97793b
...
...
@@ -235,9 +235,7 @@ public:
class
const_iterator
;
class
iterator
final
:
public
std
::
iterator
<
std
::
forward_iterator_tag
,
T
>
{
class
iterator
final
{
friend
IntrusiveList
;
friend
const_iterator
;
...
...
@@ -247,6 +245,12 @@ public:
:
cursor
(
_cursor
)
{}
public
:
using
iterator_category
=
std
::
forward_iterator_tag
;
using
value_type
=
T
;
using
difference_type
=
std
::
ptrdiff_t
;
using
pointer
=
value_type
*
;
using
reference
=
value_type
&
;
iterator
()
noexcept
=
default
;
constexpr
bool
operator
==
(
const
iterator
&
other
)
const
noexcept
{
...
...
@@ -283,9 +287,7 @@ public:
return
{
&
ToNode
(
t
)};
}
class
const_iterator
final
:
public
std
::
iterator
<
std
::
forward_iterator_tag
,
const
T
>
{
class
const_iterator
final
{
friend
IntrusiveList
;
const
IntrusiveListNode
*
cursor
;
...
...
@@ -294,6 +296,12 @@ public:
:
cursor
(
_cursor
)
{}
public
:
using
iterator_category
=
std
::
forward_iterator_tag
;
using
value_type
=
const
T
;
using
difference_type
=
std
::
ptrdiff_t
;
using
pointer
=
value_type
*
;
using
reference
=
value_type
&
;
const_iterator
()
noexcept
=
default
;
const_iterator
(
iterator
src
)
noexcept
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment