Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5139cfab
Commit
5139cfab
authored
May 27, 2020
by
Eugene Kosov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation
parent
1b3adaab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
include/ilist.h
include/ilist.h
+18
-23
No files found.
include/ilist.h
View file @
5139cfab
...
...
@@ -196,21 +196,21 @@ template <class T, class Tag= void> class sized_ilist : public ilist<T, Tag>
public:
// All containers in C++ should define these types to implement generic
// container interface.
using
typename
BASE
::
const_iterator
;
using
typename
BASE
::
const_pointer
;
using
typename
BASE
::
const_referenc
e
;
using
typename
BASE
::
const_reverse_iterator
;
using
typename
BASE
::
difference_typ
e
;
using
typename
BASE
::
iterato
r
;
using
typename
BASE
::
pointer
;
using
typename
BASE
::
reference
;
using
typename
BASE
::
reverse
_iterator
;
using
typename
BASE
::
size_type
;
using
typename
BASE
::
value_type
;
typedef
T
value_type
;
typedef
std
::
size_t
size_type
;
typedef
std
::
ptrdiff_t
difference_typ
e
;
typedef
value_type
&
reference
;
typedef
const
value_type
&
const_referenc
e
;
typedef
T
*
pointe
r
;
typedef
const
T
*
const_
pointer
;
typedef
typename
BASE
::
Iterator
iterator
;
typedef
const
typename
BASE
::
Iterator
const
_iterator
;
typedef
std
::
reverse_iterator
<
iterator
>
reverse_iterator
;
typedef
std
::
reverse_iterator
<
const
iterator
>
const_reverse_iterator
;
sized_ilist
()
:
size_
(
0
)
{}
s
td
::
size_t
size
()
const
{
return
size_
;
}
s
ize_type
size
()
const
{
return
size_
;
}
void
clear
()
{
...
...
@@ -218,31 +218,26 @@ template <class T, class Tag= void> class sized_ilist : public ilist<T, Tag>
size_
=
0
;
}
typename
ilist
<
T
,
Tag
>::
iterator
insert
(
typename
ilist
<
T
,
Tag
>::
iterator
pos
,
typename
ilist
<
T
,
Tag
>::
reference
value
)
iterator
insert
(
iterator
pos
,
reference
value
)
{
++
size_
;
return
BASE
::
insert
(
pos
,
value
);
}
typename
ilist
<
T
,
Tag
>::
iterator
erase
(
typename
ilist
<
T
,
Tag
>::
iterator
pos
)
iterator
erase
(
iterator
pos
)
{
--
size_
;
return
BASE
::
erase
(
pos
);
}
void
push_back
(
typename
ilist
<
T
,
Tag
>::
reference
value
)
{
insert
(
BASE
::
end
(),
value
);
}
void
push_back
(
reference
value
)
{
insert
(
BASE
::
end
(),
value
);
}
void
pop_back
()
{
erase
(
BASE
::
end
());
}
void
push_front
(
typename
ilist
<
T
,
Tag
>::
reference
value
)
{
insert
(
BASE
::
begin
(),
value
);
}
void
push_front
(
reference
value
)
{
insert
(
BASE
::
begin
(),
value
);
}
void
pop_front
()
{
erase
(
BASE
::
begin
());
}
void
remove
(
typename
ilist
<
T
,
Tag
>::
reference
value
)
{
erase
(
iterator
(
&
value
));
}
void
remove
(
reference
value
)
{
erase
(
iterator
(
&
value
));
}
private:
size_t
size_
;
size_t
ype
size_
;
};
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