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
cb019a17
Commit
cb019a17
authored
May 28, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable operator== for unrelated intrusive_ptr
parent
41839213
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
libcaf_core/caf/intrusive_ptr.hpp
libcaf_core/caf/intrusive_ptr.hpp
+5
-2
No files found.
libcaf_core/caf/intrusive_ptr.hpp
View file @
cb019a17
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <type_traits>
#include <type_traits>
#include "caf/detail/comparable.hpp"
#include "caf/detail/comparable.hpp"
#include "caf/detail/type_traits.hpp"
namespace
caf
{
namespace
caf
{
...
@@ -214,13 +215,15 @@ bool operator!=(const T* x, const intrusive_ptr<T>& y) {
...
@@ -214,13 +215,15 @@ bool operator!=(const T* x, const intrusive_ptr<T>& y) {
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
bool
operator
==
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
operator
==
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
return
x
.
get
()
==
y
.
get
();
return
x
.
get
()
==
y
.
get
();
}
}
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
bool
operator
!=
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
operator
!=
(
const
intrusive_ptr
<
T
>&
x
,
const
intrusive_ptr
<
U
>&
y
)
{
return
x
.
get
()
!=
y
.
get
();
return
x
.
get
()
!=
y
.
get
();
}
}
...
...
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