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
a2a4e20d
Commit
a2a4e20d
authored
Mar 07, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use a list for faster splicing
parent
ff1ff1f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cppa/partial_function.hpp
cppa/partial_function.hpp
+3
-3
No files found.
cppa/partial_function.hpp
View file @
a2a4e20d
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#ifndef PARTIAL_FUNCTION_HPP
#ifndef PARTIAL_FUNCTION_HPP
#define PARTIAL_FUNCTION_HPP
#define PARTIAL_FUNCTION_HPP
#include <list>
#include <vector>
#include <vector>
#include <memory>
#include <memory>
#include <utility>
#include <utility>
...
@@ -68,8 +69,7 @@ class partial_function
...
@@ -68,8 +69,7 @@ class partial_function
template
<
class
...
Args
>
template
<
class
...
Args
>
partial_function
&
splice
(
partial_function
&&
arg0
,
Args
&&
...
args
)
partial_function
&
splice
(
partial_function
&&
arg0
,
Args
&&
...
args
)
{
{
auto
&
vec
=
arg0
.
m_funs
;
m_funs
.
splice
(
m_funs
.
end
(),
std
::
move
(
arg0
.
m_funs
));
std
::
move
(
vec
.
begin
(),
vec
.
end
(),
std
::
back_inserter
(
m_funs
));
return
splice
(
std
::
forward
<
Args
>
(
args
)...);
return
splice
(
std
::
forward
<
Args
>
(
args
)...);
}
}
...
@@ -85,7 +85,7 @@ class partial_function
...
@@ -85,7 +85,7 @@ class partial_function
typedef
std
::
vector
<
detail
::
invokable
*>
cache_entry
;
typedef
std
::
vector
<
detail
::
invokable
*>
cache_entry
;
typedef
std
::
pair
<
void
const
*
,
cache_entry
>
cache_element
;
typedef
std
::
pair
<
void
const
*
,
cache_entry
>
cache_element
;
std
::
vector
<
invokable_ptr
>
m_funs
;
std
::
list
<
invokable_ptr
>
m_funs
;
std
::
vector
<
cache_element
>
m_cache
;
std
::
vector
<
cache_element
>
m_cache
;
cache_element
m_dummy
;
// binary search dummy
cache_element
m_dummy
;
// binary search dummy
...
...
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