Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
3f8aeac2
Commit
3f8aeac2
authored
Jun 04, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix interface of unordered_flat_map
parent
1f413779
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
libcaf_core/caf/detail/unordered_flat_map.hpp
libcaf_core/caf/detail/unordered_flat_map.hpp
+13
-8
No files found.
libcaf_core/caf/detail/unordered_flat_map.hpp
View file @
3f8aeac2
...
@@ -168,18 +168,23 @@ public:
...
@@ -168,18 +168,23 @@ public:
// -- insertion -------------------------------------------------------------
// -- insertion -------------------------------------------------------------
std
::
pair
<
iterator
,
bool
>
insert
(
value_type
x
)
{
std
::
pair
<
iterator
,
bool
>
insert
(
value_type
x
)
{
return
insert
(
end
(),
std
::
move
(
x
));
auto
i
=
find
(
x
.
first
);
if
(
i
==
end
())
{
xs_
.
emplace_back
(
std
::
move
(
x
));
return
{
xs_
.
end
()
-
1
,
true
};
}
return
{
i
,
false
};
}
}
std
::
pair
<
iterator
,
bool
>
insert
(
iterator
hint
,
value_type
x
)
{
iterator
insert
(
iterator
hint
,
value_type
x
)
{
return
insert
(
static_cast
<
const_iterator
>
(
hint
),
std
::
move
(
x
));
return
insert
(
static_cast
<
const_iterator
>
(
hint
),
std
::
move
(
x
));
}
}
std
::
pair
<
iterator
,
bool
>
insert
(
const_iterator
hint
,
value_type
x
)
{
iterator
insert
(
const_iterator
hint
,
value_type
x
)
{
auto
i
=
find
(
x
.
first
);
auto
i
=
find
(
x
.
first
);
if
(
i
==
end
()
)
return
i
==
end
(
)
return
{
xs_
.
insert
(
gcc48_iterator_workaround
(
hint
),
std
::
move
(
x
)),
true
};
?
xs_
.
insert
(
gcc48_iterator_workaround
(
hint
),
std
::
move
(
x
))
return
{
i
,
false
}
;
:
i
;
}
}
template
<
class
InputIterator
>
template
<
class
InputIterator
>
...
@@ -190,11 +195,11 @@ public:
...
@@ -190,11 +195,11 @@ public:
template
<
class
...
Ts
>
template
<
class
...
Ts
>
std
::
pair
<
iterator
,
bool
>
emplace
(
Ts
&&
...
xs
)
{
std
::
pair
<
iterator
,
bool
>
emplace
(
Ts
&&
...
xs
)
{
return
emplace_hint
(
end
(),
std
::
forward
<
Ts
>
(
xs
)...
);
return
insert
(
value_type
(
std
::
forward
<
Ts
>
(
xs
)...)
);
}
}
template
<
class
...
Ts
>
template
<
class
...
Ts
>
std
::
pair
<
iterator
,
bool
>
emplace_hint
(
const_iterator
hint
,
Ts
&&
...
xs
)
{
iterator
emplace_hint
(
const_iterator
hint
,
Ts
&&
...
xs
)
{
return
insert
(
hint
,
value_type
(
std
::
forward
<
Ts
>
(
xs
)...));
return
insert
(
hint
,
value_type
(
std
::
forward
<
Ts
>
(
xs
)...));
}
}
...
...
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