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
8d9c4afe
Commit
8d9c4afe
authored
Mar 18, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into unstable
parents
6a65f5d0
6c498131
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
5 deletions
+38
-5
ChangeLog.md
ChangeLog.md
+7
-0
cppa/get.hpp
cppa/get.hpp
+7
-4
cppa/util/rebindable_reference.hpp
cppa/util/rebindable_reference.hpp
+16
-0
manual.pdf
manual.pdf
+0
-0
unit_testing/test_sync_send.cpp
unit_testing/test_sync_send.cpp
+8
-1
No files found.
ChangeLog.md
View file @
8d9c4afe
...
@@ -12,6 +12,13 @@ __2014_XX_XX__
...
@@ -12,6 +12,13 @@ __2014_XX_XX__
*
New header
`system_messages.hpp`
for message types used by the runtime
*
New header
`system_messages.hpp`
for message types used by the runtime
-
Announce properly handles empty & POD types
-
Announce properly handles empty & POD types
Version 0.8.2
-------------
__2014-18-03__
-
Fixed a compile-time error with some user-defined message types
Version 0.8.1
Version 0.8.1
-------------
-------------
...
...
cppa/get.hpp
View file @
8d9c4afe
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include <cstddef>
#include <cstddef>
#include "cppa/util/type_traits.hpp"
#include "cppa/util/type_traits.hpp"
#include "cppa/util/rebindable_reference.hpp"
namespace
cppa
{
namespace
cppa
{
...
@@ -90,8 +91,9 @@ inline auto get_ref(std::tuple<Ts...>& tup) -> decltype(std::get<Pos>(tup)) {
...
@@ -90,8 +91,9 @@ inline auto get_ref(std::tuple<Ts...>& tup) -> decltype(std::get<Pos>(tup)) {
* depending on the cv-qualifier of @p tup.
* depending on the cv-qualifier of @p tup.
*/
*/
template
<
size_t
Pos
,
class
Tuple
>
template
<
size_t
Pos
,
class
Tuple
>
inline
auto
get_cv_aware
(
Tuple
&
tup
)
->
decltype
(
get_ref
<
Pos
>
(
tup
))
{
inline
auto
get_cv_aware
(
Tuple
&
tup
)
return
get_ref
<
Pos
>
(
tup
);
->
decltype
(
util
::
unwrap_ref
(
get_ref
<
Pos
>
(
tup
)))
{
return
util
::
unwrap_ref
(
get_ref
<
Pos
>
(
tup
));
}
}
/**
/**
...
@@ -99,8 +101,9 @@ inline auto get_cv_aware(Tuple& tup) -> decltype(get_ref<Pos>(tup)) {
...
@@ -99,8 +101,9 @@ inline auto get_cv_aware(Tuple& tup) -> decltype(get_ref<Pos>(tup)) {
* depending on the cv-qualifier of @p tup.
* depending on the cv-qualifier of @p tup.
*/
*/
template
<
size_t
Pos
,
class
Tuple
>
template
<
size_t
Pos
,
class
Tuple
>
inline
auto
get_cv_aware
(
const
Tuple
&
tup
)
->
decltype
(
get
<
Pos
>
(
tup
))
{
inline
auto
get_cv_aware
(
const
Tuple
&
tup
)
return
get
<
Pos
>
(
tup
);
->
decltype
(
util
::
unwrap_ref
(
get
<
Pos
>
(
tup
)))
{
return
util
::
unwrap_ref
(
get
<
Pos
>
(
tup
));
}
}
}
// namespace cppa
}
// namespace cppa
...
...
cppa/util/rebindable_reference.hpp
View file @
8d9c4afe
...
@@ -114,6 +114,22 @@ class rebindable_reference {
...
@@ -114,6 +114,22 @@ class rebindable_reference {
};
};
template
<
typename
T
>
T
&
unwrap_ref
(
T
&
ref
)
{
return
ref
;
}
template
<
typename
T
>
T
&
unwrap_ref
(
util
::
rebindable_reference
<
T
>&
ref
)
{
return
ref
.
get
();
}
template
<
typename
T
>
typename
std
::
add_const
<
T
>::
type
&
unwrap_ref
(
const
util
::
rebindable_reference
<
T
>&
ref
)
{
return
ref
.
get
();
}
}
}
// namespace cppa::util
}
}
// namespace cppa::util
#endif // CPPA_REBINDABLE_REFERENCE_HPP
#endif // CPPA_REBINDABLE_REFERENCE_HPP
manual.pdf
View file @
8d9c4afe
No preview for this file type
unit_testing/test_sync_send.cpp
View file @
8d9c4afe
...
@@ -7,7 +7,7 @@ using namespace cppa::placeholders;
...
@@ -7,7 +7,7 @@ using namespace cppa::placeholders;
struct
sync_mirror
:
sb_actor
<
sync_mirror
>
{
struct
sync_mirror
:
sb_actor
<
sync_mirror
>
{
behavior
init_state
;
behavior
init_state
;
sync_mirror
()
{
sync_mirror
()
{
init_state
=
(
init_state
=
(
others
()
>>
[
=
]
{
return
last_dequeued
();
}
others
()
>>
[
=
]
{
return
last_dequeued
();
}
...
@@ -167,6 +167,13 @@ struct server : event_based_actor {
...
@@ -167,6 +167,13 @@ struct server : event_based_actor {
};
};
void
compile_time_optional_variant_check
(
event_based_actor
*
self
)
{
typedef
optional_variant
<
std
::
tuple
<
int
,
float
>
,
std
::
tuple
<
float
,
int
,
int
>>
msg_type
;
self
->
sync_send
(
self
,
atom
(
"msg"
)).
then
([](
msg_type
)
{});
}
void
test_sync_send
()
{
void
test_sync_send
()
{
scoped_actor
self
;
scoped_actor
self
;
self
->
on_sync_failure
([
&
]
{
self
->
on_sync_failure
([
&
]
{
...
...
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