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
fd2fd0b1
Commit
fd2fd0b1
authored
Aug 20, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on MSVC
parent
3d8fd257
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
libcaf_test/caf/test/dsl.hpp
libcaf_test/caf/test/dsl.hpp
+27
-6
No files found.
libcaf_test/caf/test/dsl.hpp
View file @
fd2fd0b1
...
@@ -162,18 +162,34 @@ class caf_handle : caf::detail::comparable<caf_handle>,
...
@@ -162,18 +162,34 @@ class caf_handle : caf::detail::comparable<caf_handle>,
public:
public:
using
pointer
=
caf
::
abstract_actor
*
;
using
pointer
=
caf
::
abstract_actor
*
;
constexpr
caf_handle
(
)
:
ptr_
(
null
ptr
)
{
constexpr
caf_handle
(
pointer
ptr
=
nullptr
)
:
ptr_
(
ptr
)
{
// nop
// nop
}
}
template
<
class
T
>
caf_handle
(
const
caf
::
strong_actor_ptr
&
x
)
{
caf_handle
(
const
T
&
x
)
{
set
(
x
);
*
this
=
x
;
}
caf_handle
(
const
caf
::
actor
&
x
)
{
set
(
x
);
}
caf_handle
(
const
caf
::
actor_addr
&
x
)
{
set
(
x
);
}
caf_handle
(
const
caf
::
scoped_actor
&
x
)
{
set
(
x
);
}
template
<
class
...
Ts
>
caf_handle
(
const
caf
::
typed_actor
<
Ts
...
>&
x
)
{
set
(
x
);
}
}
caf_handle
(
const
caf_handle
&
)
=
default
;
caf_handle
(
const
caf_handle
&
)
=
default
;
inline
caf_handle
&
operator
=
(
caf
::
abstract_actor
*
x
)
{
caf_handle
&
operator
=
(
pointer
x
)
{
ptr_
=
x
;
ptr_
=
x
;
return
*
this
;
return
*
this
;
}
}
...
@@ -181,7 +197,7 @@ public:
...
@@ -181,7 +197,7 @@ public:
template
<
class
T
,
template
<
class
T
,
class
E
=
caf
::
detail
::
enable_if_t
<!
std
::
is_pointer
<
T
>
::
value
>>
class
E
=
caf
::
detail
::
enable_if_t
<!
std
::
is_pointer
<
T
>
::
value
>>
caf_handle
&
operator
=
(
const
T
&
x
)
{
caf_handle
&
operator
=
(
const
T
&
x
)
{
ptr_
=
caf
::
actor_cast
<
pointer
>
(
x
);
set
(
x
);
return
*
this
;
return
*
this
;
}
}
...
@@ -205,6 +221,11 @@ public:
...
@@ -205,6 +221,11 @@ public:
}
}
private:
private:
template
<
class
T
>
void
set
(
const
T
&
x
)
{
ptr_
=
caf
::
actor_cast
<
pointer
>
(
x
);
}
caf
::
abstract_actor
*
ptr_
;
caf
::
abstract_actor
*
ptr_
;
};
};
...
...
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