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
c91ace23
Commit
c91ace23
authored
Aug 06, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comparison operators of intrusive_ptr
parent
35940fa4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
CHANGELOG.md
CHANGELOG.md
+3
-1
libcaf_core/caf/intrusive_ptr.hpp
libcaf_core/caf/intrusive_ptr.hpp
+16
-12
No files found.
CHANGELOG.md
View file @
c91ace23
...
@@ -48,6 +48,8 @@ is based on [Keep a Changelog](https://keepachangelog.com).
...
@@ -48,6 +48,8 @@ is based on [Keep a Changelog](https://keepachangelog.com).
malformed output.
malformed output.
-
Fix handling of WebSocket frames that are exactly on the 65535 byte limit.
-
Fix handling of WebSocket frames that are exactly on the 65535 byte limit.
-
Fix crash when using a fallback value for optional values (#1427).
-
Fix crash when using a fallback value for optional values (#1427).
-
Fix the comparison operator of
`intrusive_ptr`
to make sure comparing to raw
pointers does not accidentally create a new
`intrusive_ptr`
instances.
## [0.19.2] - 2023-06-13
## [0.19.2] - 2023-06-13
...
...
libcaf_core/caf/intrusive_ptr.hpp
View file @
c91ace23
...
@@ -231,27 +231,31 @@ bool operator!=(std::nullptr_t, const intrusive_ptr<T>& x) {
...
@@ -231,27 +231,31 @@ bool operator!=(std::nullptr_t, const intrusive_ptr<T>& x) {
// -- comparison to raw pointer ------------------------------------------------
// -- comparison to raw pointer ------------------------------------------------
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
>
template
<
class
T
,
class
U
>
bool
operator
==
(
const
intrusive_ptr
<
T
>&
x
,
const
T
*
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
return
x
.
get
()
==
y
;
operator
==
(
const
intrusive_ptr
<
T
>&
lhs
,
const
U
*
rhs
)
{
return
lhs
.
get
()
==
rhs
;
}
}
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
>
template
<
class
T
,
class
U
>
bool
operator
==
(
const
T
*
x
,
const
intrusive_ptr
<
T
>&
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
return
x
==
y
.
get
();
operator
==
(
const
T
*
lhs
,
const
intrusive_ptr
<
U
>&
rhs
)
{
return
lhs
==
rhs
.
get
();
}
}
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
>
template
<
class
T
,
class
U
>
bool
operator
!=
(
const
intrusive_ptr
<
T
>&
x
,
const
T
*
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
return
x
.
get
()
!=
y
;
operator
!=
(
const
intrusive_ptr
<
T
>&
lhs
,
const
U
*
rhs
)
{
return
lhs
.
get
()
!=
rhs
;
}
}
/// @relates intrusive_ptr
/// @relates intrusive_ptr
template
<
class
T
>
template
<
class
T
,
class
U
>
bool
operator
!=
(
const
T
*
x
,
const
intrusive_ptr
<
T
>&
y
)
{
detail
::
enable_if_t
<
detail
::
is_comparable
<
T
*
,
U
*>::
value
,
bool
>
return
x
!=
y
.
get
();
operator
!=
(
const
T
*
lhs
,
const
intrusive_ptr
<
U
>&
rhs
)
{
return
lhs
!=
rhs
.
get
();
}
}
// -- comparison to intrusive_pointer ------------------------------------------
// -- comparison to intrusive_pointer ------------------------------------------
...
...
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