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
4be71478
Commit
4be71478
authored
Jul 17, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on GCC 4.7
parent
8b2306dd
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
21 deletions
+31
-21
caf/detail/ieee_754.hpp
caf/detail/ieee_754.hpp
+2
-2
caf/exception.hpp
caf/exception.hpp
+4
-4
caf/io/broker.hpp
caf/io/broker.hpp
+4
-3
caf/io/middleman.hpp
caf/io/middleman.hpp
+1
-1
caf/locks.hpp
caf/locks.hpp
+2
-2
caf/match_expr.hpp
caf/match_expr.hpp
+2
-1
src/basp_broker.cpp
src/basp_broker.cpp
+2
-2
src/exception.cpp
src/exception.cpp
+12
-4
src/middleman.cpp
src/middleman.cpp
+1
-1
unit_testing/test.cpp
unit_testing/test.cpp
+1
-1
No files found.
caf/detail/ieee_754.hpp
View file @
4be71478
...
...
@@ -64,7 +64,7 @@ struct ieee_754_trait<uint64_t> : ieee_754_trait<double> {};
template
<
typename
T
>
typename
ieee_754_trait
<
T
>::
packed_type
pack754
(
T
f
)
{
using
trait
=
ieee_754_trait
<
T
>
;
typedef
ieee_754_trait
<
T
>
trait
;
// using trait = ... fails on GCC 4.7
using
result_type
=
typename
trait
::
packed_type
;
// filter special type
if
(
fabs
(
f
)
<=
trait
::
zero
)
return
0
;
// only true if f equals +0 or -0
...
...
@@ -103,7 +103,7 @@ typename ieee_754_trait<T>::packed_type pack754(T f) {
template
<
typename
T
>
typename
ieee_754_trait
<
T
>::
float_type
unpack754
(
T
i
)
{
using
trait
=
ieee_754_trait
<
T
>
;
typedef
ieee_754_trait
<
T
>
trait
;
// using trait = ... fails on GCC 4.7
using
signed_type
=
typename
trait
::
signed_packed_type
;
using
result_type
=
typename
trait
::
float_type
;
if
(
i
==
0
)
return
trait
::
zero
;
...
...
caf/exception.hpp
View file @
4be71478
...
...
@@ -33,7 +33,7 @@ class caf_exception : public std::exception {
public:
~
caf_exception
();
~
caf_exception
()
noexcept
;
caf_exception
()
=
delete
;
caf_exception
(
const
caf_exception
&
)
=
default
;
...
...
@@ -72,7 +72,7 @@ class actor_exited : public caf_exception {
public:
~
actor_exited
();
~
actor_exited
()
noexcept
;
actor_exited
(
uint32_t
exit_reason
);
...
...
@@ -102,7 +102,7 @@ class network_error : public caf_exception {
public:
~
network_error
();
~
network_error
()
noexcept
;
network_error
(
std
::
string
&&
what_str
);
network_error
(
const
std
::
string
&
what_str
);
network_error
(
const
network_error
&
)
=
default
;
...
...
@@ -120,7 +120,7 @@ class bind_failure : public network_error {
public:
~
bind_failure
();
~
bind_failure
()
noexcept
;
bind_failure
(
std
::
string
&&
what_str
);
bind_failure
(
const
std
::
string
&
what_str
);
...
...
caf/io/broker.hpp
View file @
4be71478
...
...
@@ -236,7 +236,8 @@ class broker : public extend<local_actor>::
return
spawn_functor
(
nullptr
,
[
sptr
](
broker
*
forked
)
{
sptr
->
set_broker
(
forked
);
forked
->
m_scribes
.
emplace
(
sptr
->
hdl
(),
sptr
);
forked
->
m_scribes
.
insert
(
std
::
make_pair
(
sptr
->
hdl
(),
sptr
));
},
fun
,
hdl
,
std
::
forward
<
Ts
>
(
vs
)...);
}
...
...
@@ -295,7 +296,7 @@ class broker : public extend<local_actor>::
};
intrusive_ptr
<
impl
>
ptr
{
new
impl
{
this
,
std
::
move
(
sock
)}};
m_scribes
.
emplace
(
ptr
->
hdl
(),
ptr
);
m_scribes
.
insert
(
std
::
make_pair
(
ptr
->
hdl
(),
ptr
)
);
return
ptr
->
hdl
();
}
...
...
@@ -336,7 +337,7 @@ class broker : public extend<local_actor>::
};
intrusive_ptr
<
impl
>
ptr
{
new
impl
{
this
,
std
::
move
(
sock
)}};
m_doormen
.
emplace
(
ptr
->
hdl
(),
ptr
);
m_doormen
.
insert
(
std
::
make_pair
(
ptr
->
hdl
(),
ptr
)
);
if
(
initialized
())
ptr
->
launch
();
return
ptr
->
hdl
();
}
...
...
caf/io/middleman.hpp
View file @
4be71478
...
...
@@ -110,7 +110,7 @@ intrusive_ptr<Impl> middleman::get_named_broker(atom_value name) {
if
(
i
!=
m_named_brokers
.
end
())
return
static_cast
<
Impl
*>
(
i
->
second
.
get
());
intrusive_ptr
<
Impl
>
result
{
new
Impl
};
result
->
launch
(
true
,
nullptr
);
m_named_brokers
.
emplace
(
name
,
result
);
m_named_brokers
.
insert
(
std
::
make_pair
(
name
,
result
)
);
return
result
;
}
...
...
caf/locks.hpp
View file @
4be71478
...
...
@@ -67,8 +67,8 @@ class upgrade_to_unique_lock {
using
lockable
=
UpgradeLockable
;
template
<
template
<
typename
>
class
LockType
>
upgrade_to_unique_lock
(
LockType
<
lockable
>
&
other
)
{
template
<
class
LockType
>
upgrade_to_unique_lock
(
LockType
&
other
)
{
m_lockable
=
other
.
release
();
if
(
m_lockable
)
m_lockable
->
lock_upgrade
();
}
...
...
caf/match_expr.hpp
View file @
4be71478
...
...
@@ -475,7 +475,8 @@ Result unroll_expr(PPFPs& fs, uint64_t bitmask, long_constant<N>,
auto
&
f
=
get
<
N
>
(
fs
);
using
Fun
=
typename
detail
::
rm_const_and_ref
<
decltype
(
f
)
>::
type
;
using
pattern_type
=
typename
Fun
::
pattern_type
;
using
policy
=
detail
::
invoke_util
<
pattern_type
>
;
//using policy = detail::invoke_util<pattern_type>;
typedef
detail
::
invoke_util
<
pattern_type
>
policy
;
// using fails on GCC 4.7
typename
policy
::
tuple_type
targs
;
if
(
policy
::
prepare_invoke
(
targs
,
type_token
,
is_dynamic
,
ptr
,
tup
))
{
auto
is
=
detail
::
get_indices
(
targs
);
...
...
src/basp_broker.cpp
View file @
4be71478
...
...
@@ -304,7 +304,7 @@ basp_broker::handle_basp_header(connection_context& ctx,
std
::
set
<
string
>
remote_ifs
;
for
(
uint32_t
i
=
0
;
i
<
remote_ifs_size
;
++
i
)
{
auto
str
=
bd
.
read
<
string
>
();
remote_ifs
.
emplace
(
std
::
move
(
str
));
remote_ifs
.
insert
(
std
::
move
(
str
));
}
auto
&
ifs
=
*
(
ctx
.
handshake_data
->
expected_ifs
);
if
(
!
std
::
includes
(
ifs
.
begin
(),
ifs
.
end
(),
...
...
@@ -565,7 +565,7 @@ void basp_broker::init_handshake_as_sever(connection_context& ctx,
void
basp_broker
::
announce_published_actor
(
accept_handle
hdl
,
const
abstract_actor_ptr
&
ptr
)
{
m_published_actors
.
emplace
(
hdl
,
ptr
);
m_published_actors
.
insert
(
std
::
make_pair
(
hdl
,
ptr
)
);
singletons
::
get_actor_registry
()
->
put
(
ptr
->
id
(),
ptr
);
}
...
...
src/exception.cpp
View file @
4be71478
...
...
@@ -42,7 +42,9 @@ std::string ae_what(uint32_t reason) {
namespace
caf
{
caf_exception
::~
caf_exception
()
{}
caf_exception
::~
caf_exception
()
noexcept
{
// nop
}
caf_exception
::
caf_exception
(
const
std
::
string
&
what_str
)
:
m_what
(
what_str
)
{}
...
...
@@ -52,7 +54,9 @@ caf_exception::caf_exception(std::string&& what_str)
const
char
*
caf_exception
::
what
()
const
noexcept
{
return
m_what
.
c_str
();
}
actor_exited
::~
actor_exited
()
{}
actor_exited
::~
actor_exited
()
noexcept
{
// nop
}
actor_exited
::
actor_exited
(
uint32_t
reason
)
:
caf_exception
(
ae_what
(
reason
))
{
m_reason
=
reason
;
...
...
@@ -62,12 +66,16 @@ network_error::network_error(const std::string& str) : super(str) {}
network_error
::
network_error
(
std
::
string
&&
str
)
:
super
(
std
::
move
(
str
))
{}
network_error
::~
network_error
()
{}
network_error
::~
network_error
()
noexcept
{
// nop
}
bind_failure
::
bind_failure
(
const
std
::
string
&
str
)
:
super
(
str
)
{}
bind_failure
::
bind_failure
(
std
::
string
&&
str
)
:
super
(
std
::
move
(
str
))
{}
bind_failure
::~
bind_failure
()
{}
bind_failure
::~
bind_failure
()
noexcept
{
// nop
}
}
// namespace caf
src/middleman.cpp
View file @
4be71478
...
...
@@ -62,7 +62,7 @@ middleman* middleman::instance() {
}
void
middleman
::
add_broker
(
broker_ptr
bptr
)
{
m_brokers
.
emplace
(
bptr
);
m_brokers
.
insert
(
bptr
);
bptr
->
attach_functor
([
=
](
uint32_t
)
{
m_brokers
.
erase
(
bptr
);
});
...
...
unit_testing/test.cpp
View file @
4be71478
...
...
@@ -50,7 +50,7 @@ vector<string> split(const string& str, char delim, bool keep_empties) {
return
result
;
}
void
verbose_terminate
[[
noreturn
]]
()
{
void
verbose_terminate
()
{
try
{
throw
;
}
...
...
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