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
f1a515ff
Commit
f1a515ff
authored
Apr 28, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed reference_wrapper handling
parent
8c478912
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
cppa/detail/value_guard.hpp
cppa/detail/value_guard.hpp
+19
-6
No files found.
cppa/detail/value_guard.hpp
View file @
f1a515ff
...
@@ -69,23 +69,36 @@ class value_guard
...
@@ -69,23 +69,36 @@ class value_guard
typename
tdata_from_type_list
<
FilteredPattern
>::
type
m_args
;
typename
tdata_from_type_list
<
FilteredPattern
>::
type
m_args
;
template
<
typename
...
Args
>
template
<
typename
...
Args
>
inline
bool
_eval
(
util
::
void_type
const
&
,
tdata
<>
const
&
,
Args
&&
...)
const
static
inline
bool
_eval
(
util
::
void_type
const
&
,
tdata
<>
const
&
,
Args
const
&
...)
{
{
return
true
;
return
true
;
}
}
template
<
class
Tail
,
typename
Arg0
,
typename
...
Args
>
template
<
class
Tail
,
typename
Arg0
,
typename
...
Args
>
inline
bool
_eval
(
util
::
void_type
const
&
,
Tail
const
&
tail
,
static
inline
bool
_eval
(
util
::
void_type
const
&
,
Tail
const
&
tail
,
Arg0
const
&
,
Args
const
&
...
args
)
const
Arg0
const
&
,
Args
const
&
...
args
)
{
{
return
_eval
(
tail
.
head
,
tail
.
tail
(),
args
...);
return
_eval
(
tail
.
head
,
tail
.
tail
(),
args
...);
}
}
template
<
typename
T0
,
typename
T1
>
static
inline
bool
cmp
(
T0
const
&
lhs
,
T1
const
&
rhs
)
{
return
lhs
==
rhs
;
}
template
<
typename
T0
,
typename
T1
>
static
inline
bool
cmp
(
T0
const
&
lhs
,
std
::
reference_wrapper
<
T1
>
const
&
rhs
)
{
return
lhs
==
rhs
.
get
();
}
template
<
typename
Head
,
class
Tail
,
typename
Arg0
,
typename
...
Args
>
template
<
typename
Head
,
class
Tail
,
typename
Arg0
,
typename
...
Args
>
inline
bool
_eval
(
Head
const
&
head
,
Tail
const
&
tail
,
static
inline
bool
_eval
(
Head
const
&
head
,
Tail
const
&
tail
,
Arg0
const
&
arg0
,
Args
const
&
...
args
)
const
Arg0
const
&
arg0
,
Args
const
&
...
args
)
{
{
return
head
==
arg0
&&
_eval
(
tail
.
head
,
tail
.
tail
(),
args
...);
return
cmp
(
head
,
arg0
)
&&
_eval
(
tail
.
head
,
tail
.
tail
(),
args
...);
}
}
public:
public:
...
...
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