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
f40c9f16
Commit
f40c9f16
authored
Apr 02, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disambiguation for operator==(self_type,actor_ptr)
parent
492673e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
cppa/self.hpp
cppa/self.hpp
+6
-0
src/self.cpp
src/self.cpp
+16
-8
No files found.
cppa/self.hpp
View file @
f40c9f16
...
...
@@ -146,6 +146,12 @@ class scoped_self_setter {
};
// disambiguation (compiler gets confused with cast operator otherwise)
bool
operator
==
(
const
actor_ptr
&
lhs
,
const
self_type
&
rhs
);
bool
operator
==
(
const
self_type
&
lhs
,
const
actor_ptr
&
rhs
);
bool
operator
!=
(
const
actor_ptr
&
lhs
,
const
self_type
&
rhs
);
bool
operator
!=
(
const
self_type
&
lhs
,
const
actor_ptr
&
rhs
);
#endif // CPPA_DOCUMENTATION
}
// namespace cppa
...
...
src/self.cpp
View file @
f40c9f16
...
...
@@ -96,14 +96,6 @@ void tss_reset(local_actor* ptr, bool inc_ref_count = true) {
}
// namespace <anonymous>
bool
operator
==
(
const
actor_ptr
&
lhs
,
const
self_type
&
rhs
)
{
return
lhs
.
get
()
==
rhs
.
get
();
}
bool
operator
!=
(
const
self_type
&
lhs
,
const
actor_ptr
&
rhs
)
{
return
lhs
.
get
()
!=
rhs
.
get
();
}
void
self_type
::
cleanup_fun
(
cppa
::
local_actor
*
what
)
{
if
(
what
)
{
auto
ptr
=
dynamic_cast
<
thread_mapped_actor
*>
(
what
);
...
...
@@ -139,4 +131,20 @@ self_type::pointer self_type::release_impl() {
return
tss_release
();
}
bool
operator
==
(
const
actor_ptr
&
lhs
,
const
self_type
&
rhs
)
{
return
lhs
.
get
()
==
rhs
.
get
();
}
bool
operator
==
(
const
self_type
&
lhs
,
const
actor_ptr
&
rhs
)
{
return
rhs
==
lhs
;
}
bool
operator
!=
(
const
actor_ptr
&
lhs
,
const
self_type
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
bool
operator
!=
(
const
self_type
&
lhs
,
const
actor_ptr
&
rhs
)
{
return
!
(
rhs
==
lhs
);
}
}
// namespace cppa
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