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
4e4c8732
Commit
4e4c8732
authored
Apr 18, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reduntant inline declarations
parent
eb5a2275
Changes
73
Hide whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
238 additions
and
250 deletions
+238
-250
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+4
-4
libcaf_core/caf/abstract_channel.hpp
libcaf_core/caf/abstract_channel.hpp
+5
-5
libcaf_core/caf/abstract_group.hpp
libcaf_core/caf/abstract_group.hpp
+2
-2
libcaf_core/caf/actor.hpp
libcaf_core/caf/actor.hpp
+11
-11
libcaf_core/caf/actor_addr.hpp
libcaf_core/caf/actor_addr.hpp
+12
-12
libcaf_core/caf/actor_control_block.hpp
libcaf_core/caf/actor_control_block.hpp
+5
-5
libcaf_core/caf/actor_ostream.hpp
libcaf_core/caf/actor_ostream.hpp
+4
-4
libcaf_core/caf/blocking_actor.hpp
libcaf_core/caf/blocking_actor.hpp
+3
-3
libcaf_core/caf/delegated.hpp
libcaf_core/caf/delegated.hpp
+1
-2
libcaf_core/caf/detail/algorithms.hpp
libcaf_core/caf/detail/algorithms.hpp
+1
-1
libcaf_core/caf/detail/behavior_stack.hpp
libcaf_core/caf/detail/behavior_stack.hpp
+5
-5
libcaf_core/caf/detail/blocking_behavior.hpp
libcaf_core/caf/detail/blocking_behavior.hpp
+1
-1
libcaf_core/caf/detail/bounds_checker.hpp
libcaf_core/caf/detail/bounds_checker.hpp
+2
-2
libcaf_core/caf/detail/disposer.hpp
libcaf_core/caf/detail/disposer.hpp
+1
-1
libcaf_core/caf/detail/ini_consumer.hpp
libcaf_core/caf/detail/ini_consumer.hpp
+1
-1
libcaf_core/caf/detail/network_order.hpp
libcaf_core/caf/detail/network_order.hpp
+2
-2
libcaf_core/caf/detail/optional_message_visitor.hpp
libcaf_core/caf/detail/optional_message_visitor.hpp
+5
-5
libcaf_core/caf/detail/parser/chars.hpp
libcaf_core/caf/detail/parser/chars.hpp
+4
-4
libcaf_core/caf/detail/parser/is_digit.hpp
libcaf_core/caf/detail/parser/is_digit.hpp
+12
-21
libcaf_core/caf/detail/parser/read_ipv6_address.hpp
libcaf_core/caf/detail/parser/read_ipv6_address.hpp
+2
-2
libcaf_core/caf/detail/parser/read_uri.hpp
libcaf_core/caf/detail/parser/read_uri.hpp
+1
-1
libcaf_core/caf/detail/pseudo_tuple.hpp
libcaf_core/caf/detail/pseudo_tuple.hpp
+3
-3
libcaf_core/caf/detail/scope_guard.hpp
libcaf_core/caf/detail/scope_guard.hpp
+1
-1
libcaf_core/caf/detail/split_join.hpp
libcaf_core/caf/detail/split_join.hpp
+1
-1
libcaf_core/caf/detail/stream_distribution_tree.hpp
libcaf_core/caf/detail/stream_distribution_tree.hpp
+2
-2
libcaf_core/caf/detail/tick_emitter.hpp
libcaf_core/caf/detail/tick_emitter.hpp
+1
-1
libcaf_core/caf/detail/variant_data.hpp
libcaf_core/caf/detail/variant_data.hpp
+3
-3
libcaf_core/caf/dictionary.hpp
libcaf_core/caf/dictionary.hpp
+6
-6
libcaf_core/caf/downstream_manager.hpp
libcaf_core/caf/downstream_manager.hpp
+1
-1
libcaf_core/caf/downstream_manager_base.hpp
libcaf_core/caf/downstream_manager_base.hpp
+2
-2
libcaf_core/caf/error.hpp
libcaf_core/caf/error.hpp
+3
-3
libcaf_core/caf/fused_downstream_manager.hpp
libcaf_core/caf/fused_downstream_manager.hpp
+1
-1
libcaf_core/caf/group_module.hpp
libcaf_core/caf/group_module.hpp
+2
-2
libcaf_core/caf/ipv4_address.hpp
libcaf_core/caf/ipv4_address.hpp
+6
-6
libcaf_core/caf/ipv4_subnet.hpp
libcaf_core/caf/ipv4_subnet.hpp
+2
-2
libcaf_core/caf/ipv6_address.hpp
libcaf_core/caf/ipv6_address.hpp
+5
-5
libcaf_core/caf/ipv6_subnet.hpp
libcaf_core/caf/ipv6_subnet.hpp
+2
-2
libcaf_core/caf/no_stages.hpp
libcaf_core/caf/no_stages.hpp
+1
-1
libcaf_core/caf/policy/downstream_messages.hpp
libcaf_core/caf/policy/downstream_messages.hpp
+1
-1
libcaf_core/caf/policy/normal_messages.hpp
libcaf_core/caf/policy/normal_messages.hpp
+1
-1
libcaf_core/caf/policy/upstream_messages.hpp
libcaf_core/caf/policy/upstream_messages.hpp
+1
-1
libcaf_core/caf/policy/urgent_messages.hpp
libcaf_core/caf/policy/urgent_messages.hpp
+1
-1
libcaf_core/caf/policy/work_sharing.hpp
libcaf_core/caf/policy/work_sharing.hpp
+2
-2
libcaf_core/caf/policy/work_stealing.hpp
libcaf_core/caf/policy/work_stealing.hpp
+1
-1
libcaf_core/caf/ref_counted.hpp
libcaf_core/caf/ref_counted.hpp
+3
-3
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+12
-12
libcaf_core/caf/scheduler/abstract_coordinator.hpp
libcaf_core/caf/scheduler/abstract_coordinator.hpp
+5
-5
libcaf_core/caf/scheduler/test_coordinator.hpp
libcaf_core/caf/scheduler/test_coordinator.hpp
+1
-1
libcaf_core/caf/scoped_actor.hpp
libcaf_core/caf/scoped_actor.hpp
+6
-6
libcaf_core/caf/stream_slot.hpp
libcaf_core/caf/stream_slot.hpp
+1
-1
libcaf_core/caf/string_algorithms.hpp
libcaf_core/caf/string_algorithms.hpp
+1
-1
libcaf_core/caf/type_erased_value.hpp
libcaf_core/caf/type_erased_value.hpp
+2
-2
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+6
-6
libcaf_core/caf/typed_response_promise.hpp
libcaf_core/caf/typed_response_promise.hpp
+10
-12
libcaf_core/caf/uri.hpp
libcaf_core/caf/uri.hpp
+1
-1
libcaf_core/caf/variant.hpp
libcaf_core/caf/variant.hpp
+3
-3
libcaf_io/caf/io/abstract_broker.hpp
libcaf_io/caf/io/abstract_broker.hpp
+6
-6
libcaf_io/caf/io/accept_handle.hpp
libcaf_io/caf/io/accept_handle.hpp
+1
-1
libcaf_io/caf/io/basp/connection_state.hpp
libcaf_io/caf/io/basp/connection_state.hpp
+2
-2
libcaf_io/caf/io/broker_servant.hpp
libcaf_io/caf/io/broker_servant.hpp
+1
-1
libcaf_io/caf/io/connect.hpp
libcaf_io/caf/io/connect.hpp
+2
-2
libcaf_io/caf/io/connection_handle.hpp
libcaf_io/caf/io/connection_handle.hpp
+1
-1
libcaf_io/caf/io/datagram_handle.hpp
libcaf_io/caf/io/datagram_handle.hpp
+1
-1
libcaf_io/caf/io/middleman.hpp
libcaf_io/caf/io/middleman.hpp
+2
-2
libcaf_io/caf/io/network/acceptor.hpp
libcaf_io/caf/io/network/acceptor.hpp
+1
-1
libcaf_io/caf/io/network/default_multiplexer.hpp
libcaf_io/caf/io/network/default_multiplexer.hpp
+3
-3
libcaf_io/caf/io/network/manager.hpp
libcaf_io/caf/io/network/manager.hpp
+1
-1
libcaf_io/caf/io/network/multiplexer.hpp
libcaf_io/caf/io/network/multiplexer.hpp
+2
-2
libcaf_io/caf/io/network/receive_buffer.hpp
libcaf_io/caf/io/network/receive_buffer.hpp
+18
-18
libcaf_io/caf/io/network/stream.hpp
libcaf_io/caf/io/network/stream.hpp
+2
-2
libcaf_io/caf/io/network/test_multiplexer.hpp
libcaf_io/caf/io/network/test_multiplexer.hpp
+4
-4
libcaf_openssl/caf/openssl/manager.hpp
libcaf_openssl/caf/openssl/manager.hpp
+3
-3
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+4
-4
No files found.
libcaf_core/caf/abstract_actor.hpp
View file @
4e4c8732
...
@@ -54,7 +54,7 @@ constexpr actor_id invalid_actor_id = 0;
...
@@ -54,7 +54,7 @@ constexpr actor_id invalid_actor_id = 0;
class
CAF_CORE_EXPORT
abstract_actor
:
public
abstract_channel
{
class
CAF_CORE_EXPORT
abstract_actor
:
public
abstract_channel
{
public:
public:
// allow placement new (only)
// allow placement new (only)
inline
void
*
operator
new
(
std
::
size_t
,
void
*
ptr
)
{
void
*
operator
new
(
std
::
size_t
,
void
*
ptr
)
{
return
ptr
;
return
ptr
;
}
}
...
@@ -140,17 +140,17 @@ public:
...
@@ -140,17 +140,17 @@ public:
static
constexpr
int
is_cleaned_up_flag
=
0x1000
;
// monitorable_actor
static
constexpr
int
is_cleaned_up_flag
=
0x1000
;
// monitorable_actor
static
constexpr
int
is_shutting_down_flag
=
0x2000
;
// scheduled_actor
static
constexpr
int
is_shutting_down_flag
=
0x2000
;
// scheduled_actor
inline
void
setf
(
int
flag
)
{
void
setf
(
int
flag
)
{
auto
x
=
flags
();
auto
x
=
flags
();
flags
(
x
|
flag
);
flags
(
x
|
flag
);
}
}
inline
void
unsetf
(
int
flag
)
{
void
unsetf
(
int
flag
)
{
auto
x
=
flags
();
auto
x
=
flags
();
flags
(
x
&
~
flag
);
flags
(
x
&
~
flag
);
}
}
inline
bool
getf
(
int
flag
)
const
{
bool
getf
(
int
flag
)
const
{
return
(
flags
()
&
flag
)
!=
0
;
return
(
flags
()
&
flag
)
!=
0
;
}
}
...
...
libcaf_core/caf/abstract_channel.hpp
View file @
4e4c8732
...
@@ -53,15 +53,15 @@ public:
...
@@ -53,15 +53,15 @@ public:
static
constexpr
int
is_hidden_flag
=
0x10000000
;
static
constexpr
int
is_hidden_flag
=
0x10000000
;
inline
bool
is_abstract_actor
()
const
{
bool
is_abstract_actor
()
const
{
return
static_cast
<
bool
>
(
flags
()
&
is_abstract_actor_flag
);
return
static_cast
<
bool
>
(
flags
()
&
is_abstract_actor_flag
);
}
}
inline
bool
is_abstract_group
()
const
{
bool
is_abstract_group
()
const
{
return
static_cast
<
bool
>
(
flags
()
&
is_abstract_group_flag
);
return
static_cast
<
bool
>
(
flags
()
&
is_abstract_group_flag
);
}
}
inline
bool
is_actor_decorator
()
const
{
bool
is_actor_decorator
()
const
{
return
static_cast
<
bool
>
(
flags
()
&
is_actor_decorator_mask
);
return
static_cast
<
bool
>
(
flags
()
&
is_actor_decorator_mask
);
}
}
...
@@ -72,11 +72,11 @@ protected:
...
@@ -72,11 +72,11 @@ protected:
// flags that are considered constant after an actor has launched are
// flags that are considered constant after an actor has launched are
// read by others, i.e., there is no acquire/release semantic between
// read by others, i.e., there is no acquire/release semantic between
// setting and reading flags
// setting and reading flags
in
line
in
t
flags
()
const
{
int
flags
()
const
{
return
flags_
.
load
(
std
::
memory_order_relaxed
);
return
flags_
.
load
(
std
::
memory_order_relaxed
);
}
}
inline
void
flags
(
int
new_value
)
{
void
flags
(
int
new_value
)
{
flags_
.
store
(
new_value
,
std
::
memory_order_relaxed
);
flags_
.
store
(
new_value
,
std
::
memory_order_relaxed
);
}
}
...
...
libcaf_core/caf/abstract_group.hpp
View file @
4e4c8732
...
@@ -65,12 +65,12 @@ public:
...
@@ -65,12 +65,12 @@ public:
// -- observers --------------------------------------------------------------
// -- observers --------------------------------------------------------------
/// Returns the parent module.
/// Returns the parent module.
inline
group_module
&
module
()
const
{
group_module
&
module
()
const
{
return
parent_
;
return
parent_
;
}
}
/// Returns the hosting system.
/// Returns the hosting system.
inline
actor_system
&
system
()
const
{
actor_system
&
system
()
const
{
return
system_
;
return
system_
;
}
}
...
...
libcaf_core/caf/actor.hpp
View file @
4e4c8732
...
@@ -91,12 +91,12 @@ public:
...
@@ -91,12 +91,12 @@ public:
actor
&
operator
=
(
const
scoped_actor
&
x
);
actor
&
operator
=
(
const
scoped_actor
&
x
);
/// Queries whether this actor handle is valid.
/// Queries whether this actor handle is valid.
inline
explicit
operator
bool
()
const
{
explicit
operator
bool
()
const
{
return
static_cast
<
bool
>
(
ptr_
);
return
static_cast
<
bool
>
(
ptr_
);
}
}
/// Queries whether this actor handle is invalid.
/// Queries whether this actor handle is invalid.
inline
bool
operator
!
()
const
{
bool
operator
!
()
const
{
return
!
ptr_
;
return
!
ptr_
;
}
}
...
@@ -104,17 +104,17 @@ public:
...
@@ -104,17 +104,17 @@ public:
actor_addr
address
()
const
noexcept
;
actor_addr
address
()
const
noexcept
;
/// Returns the ID of this actor.
/// Returns the ID of this actor.
inline
actor_id
id
()
const
noexcept
{
actor_id
id
()
const
noexcept
{
return
ptr_
->
id
();
return
ptr_
->
id
();
}
}
/// Returns the origin node of this actor.
/// Returns the origin node of this actor.
inline
node_id
node
()
const
noexcept
{
node_id
node
()
const
noexcept
{
return
ptr_
->
node
();
return
ptr_
->
node
();
}
}
/// Returns the hosting actor system.
/// Returns the hosting actor system.
inline
actor_system
&
home_system
()
const
noexcept
{
actor_system
&
home_system
()
const
noexcept
{
return
*
ptr_
->
home_system
;
return
*
ptr_
->
home_system
;
}
}
...
@@ -123,7 +123,7 @@ public:
...
@@ -123,7 +123,7 @@ public:
/// @cond PRIVATE
/// @cond PRIVATE
inline
abstract_actor
*
operator
->
()
const
noexcept
{
abstract_actor
*
operator
->
()
const
noexcept
{
CAF_ASSERT
(
ptr_
);
CAF_ASSERT
(
ptr_
);
return
ptr_
->
get
();
return
ptr_
->
get
();
}
}
...
@@ -138,11 +138,11 @@ public:
...
@@ -138,11 +138,11 @@ public:
/// @endcond
/// @endcond
friend
inline
std
::
string
to_string
(
const
actor
&
x
)
{
friend
std
::
string
to_string
(
const
actor
&
x
)
{
return
to_string
(
x
.
ptr_
);
return
to_string
(
x
.
ptr_
);
}
}
friend
inline
void
append_to_string
(
std
::
string
&
x
,
const
actor
&
y
)
{
friend
void
append_to_string
(
std
::
string
&
x
,
const
actor
&
y
)
{
return
append_to_string
(
x
,
y
.
ptr_
);
return
append_to_string
(
x
,
y
.
ptr_
);
}
}
...
@@ -158,11 +158,11 @@ public:
...
@@ -158,11 +158,11 @@ public:
}
}
private:
private:
inline
actor_control_block
*
get
()
const
noexcept
{
actor_control_block
*
get
()
const
noexcept
{
return
ptr_
.
get
();
return
ptr_
.
get
();
}
}
inline
actor_control_block
*
release
()
noexcept
{
actor_control_block
*
release
()
noexcept
{
return
ptr_
.
release
();
return
ptr_
.
release
();
}
}
...
@@ -192,7 +192,7 @@ CAF_CORE_EXPORT bool operator!=(abstract_actor* lhs, const actor& rhs);
...
@@ -192,7 +192,7 @@ CAF_CORE_EXPORT bool operator!=(abstract_actor* lhs, const actor& rhs);
namespace
std
{
namespace
std
{
template
<
>
template
<
>
struct
hash
<
caf
::
actor
>
{
struct
hash
<
caf
::
actor
>
{
inline
size_t
operator
()(
const
caf
::
actor
&
ref
)
cons
t
{
size_t
operator
()(
const
caf
::
actor
&
ref
)
const
noexcep
t
{
return
static_cast
<
size_t
>
(
ref
?
ref
->
id
()
:
0
);
return
static_cast
<
size_t
>
(
ref
?
ref
->
id
()
:
0
);
}
}
};
};
...
...
libcaf_core/caf/actor_addr.hpp
View file @
4e4c8732
...
@@ -61,24 +61,24 @@ public:
...
@@ -61,24 +61,24 @@ public:
actor_addr
&
operator
=
(
std
::
nullptr_t
);
actor_addr
&
operator
=
(
std
::
nullptr_t
);
/// Returns the ID of this actor.
/// Returns the ID of this actor.
inline
actor_id
id
()
const
noexcept
{
actor_id
id
()
const
noexcept
{
return
ptr_
->
id
();
return
ptr_
->
id
();
}
}
/// Returns the origin node of this actor.
/// Returns the origin node of this actor.
inline
node_id
node
()
const
noexcept
{
node_id
node
()
const
noexcept
{
return
ptr_
->
node
();
return
ptr_
->
node
();
}
}
/// Returns the hosting actor system.
/// Returns the hosting actor system.
inline
actor_system
&
home_system
()
const
noexcept
{
actor_system
&
home_system
()
const
noexcept
{
return
*
ptr_
->
home_system
;
return
*
ptr_
->
home_system
;
}
}
/// Exchange content of `*this` and `other`.
/// Exchange content of `*this` and `other`.
void
swap
(
actor_addr
&
other
)
noexcept
;
void
swap
(
actor_addr
&
other
)
noexcept
;
inline
explicit
operator
bool
()
const
{
explicit
operator
bool
()
const
{
return
static_cast
<
bool
>
(
ptr_
);
return
static_cast
<
bool
>
(
ptr_
);
}
}
...
@@ -93,19 +93,19 @@ public:
...
@@ -93,19 +93,19 @@ public:
intptr_t
compare
(
const
actor_control_block
*
other
)
const
noexcept
;
intptr_t
compare
(
const
actor_control_block
*
other
)
const
noexcept
;
in
line
in
tptr_t
compare
(
const
weak_actor_ptr
&
other
)
const
noexcept
{
intptr_t
compare
(
const
weak_actor_ptr
&
other
)
const
noexcept
{
return
compare
(
other
.
get
());
return
compare
(
other
.
get
());
}
}
in
line
in
tptr_t
compare
(
const
strong_actor_ptr
&
other
)
const
noexcept
{
intptr_t
compare
(
const
strong_actor_ptr
&
other
)
const
noexcept
{
return
compare
(
other
.
get
());
return
compare
(
other
.
get
());
}
}
friend
inline
std
::
string
to_string
(
const
actor_addr
&
x
)
{
friend
std
::
string
to_string
(
const
actor_addr
&
x
)
{
return
to_string
(
x
.
ptr_
);
return
to_string
(
x
.
ptr_
);
}
}
friend
inline
void
append_to_string
(
std
::
string
&
x
,
const
actor_addr
&
y
)
{
friend
void
append_to_string
(
std
::
string
&
x
,
const
actor_addr
&
y
)
{
return
append_to_string
(
x
,
y
.
ptr_
);
return
append_to_string
(
x
,
y
.
ptr_
);
}
}
...
@@ -122,18 +122,18 @@ public:
...
@@ -122,18 +122,18 @@ public:
actor_addr
(
actor_control_block
*
,
bool
);
actor_addr
(
actor_control_block
*
,
bool
);
inline
actor_control_block
*
get
()
const
noexcept
{
actor_control_block
*
get
()
const
noexcept
{
return
ptr_
.
get
();
return
ptr_
.
get
();
}
}
/// @endcond
/// @endcond
private:
private:
inline
actor_control_block
*
release
()
noexcept
{
actor_control_block
*
release
()
noexcept
{
return
ptr_
.
release
();
return
ptr_
.
release
();
}
}
inline
actor_control_block
*
get_locked
()
const
noexcept
{
actor_control_block
*
get_locked
()
const
noexcept
{
return
ptr_
.
get_locked
();
return
ptr_
.
get_locked
();
}
}
...
@@ -164,7 +164,7 @@ inline bool operator!=(std::nullptr_t, const actor_addr& x) {
...
@@ -164,7 +164,7 @@ inline bool operator!=(std::nullptr_t, const actor_addr& x) {
namespace
std
{
namespace
std
{
template
<
>
template
<
>
struct
hash
<
caf
::
actor_addr
>
{
struct
hash
<
caf
::
actor_addr
>
{
inline
size_t
operator
()(
const
caf
::
actor_addr
&
ref
)
const
{
size_t
operator
()(
const
caf
::
actor_addr
&
ref
)
const
{
return
static_cast
<
size_t
>
(
ref
.
id
());
return
static_cast
<
size_t
>
(
ref
.
id
());
}
}
};
};
...
...
libcaf_core/caf/actor_control_block.hpp
View file @
4e4c8732
...
@@ -107,7 +107,7 @@ public:
...
@@ -107,7 +107,7 @@ public:
"functiion pointer and regular pointers have different size"
);
"functiion pointer and regular pointers have different size"
);
/// Returns a pointer to the actual actor instance.
/// Returns a pointer to the actual actor instance.
inline
abstract_actor
*
get
()
{
abstract_actor
*
get
()
{
// this pointer arithmetic is compile-time checked in actor_storage's ctor
// this pointer arithmetic is compile-time checked in actor_storage's ctor
return
reinterpret_cast
<
abstract_actor
*>
(
reinterpret_cast
<
intptr_t
>
(
this
)
return
reinterpret_cast
<
abstract_actor
*>
(
reinterpret_cast
<
intptr_t
>
(
this
)
+
CAF_CACHE_LINE_SIZE
);
+
CAF_CACHE_LINE_SIZE
);
...
@@ -125,11 +125,11 @@ public:
...
@@ -125,11 +125,11 @@ public:
actor_addr
address
();
actor_addr
address
();
inline
actor_id
id
()
const
noexcept
{
actor_id
id
()
const
noexcept
{
return
aid
;
return
aid
;
}
}
inline
const
node_id
&
node
()
const
noexcept
{
const
node_id
&
node
()
const
noexcept
{
return
nid
;
return
nid
;
}
}
...
@@ -233,14 +233,14 @@ namespace std {
...
@@ -233,14 +233,14 @@ namespace std {
template
<
>
template
<
>
struct
hash
<
caf
::
strong_actor_ptr
>
{
struct
hash
<
caf
::
strong_actor_ptr
>
{
inline
size_t
operator
()(
const
caf
::
strong_actor_ptr
&
ptr
)
const
{
size_t
operator
()(
const
caf
::
strong_actor_ptr
&
ptr
)
const
{
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
}
}
};
};
template
<
>
template
<
>
struct
hash
<
caf
::
weak_actor_ptr
>
{
struct
hash
<
caf
::
weak_actor_ptr
>
{
inline
size_t
operator
()(
const
caf
::
weak_actor_ptr
&
ptr
)
const
{
size_t
operator
()(
const
caf
::
weak_actor_ptr
&
ptr
)
const
{
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
}
}
};
};
...
...
libcaf_core/caf/actor_ostream.hpp
View file @
4e4c8732
...
@@ -66,12 +66,12 @@ public:
...
@@ -66,12 +66,12 @@ public:
static
void
redirect_all
(
actor_system
&
sys
,
std
::
string
fn
,
int
flags
=
0
);
static
void
redirect_all
(
actor_system
&
sys
,
std
::
string
fn
,
int
flags
=
0
);
/// Writes `arg` to the buffer allocated for the calling actor.
/// Writes `arg` to the buffer allocated for the calling actor.
inline
actor_ostream
&
operator
<<
(
const
char
*
arg
)
{
actor_ostream
&
operator
<<
(
const
char
*
arg
)
{
return
write
(
arg
);
return
write
(
arg
);
}
}
/// Writes `arg` to the buffer allocated for the calling actor.
/// Writes `arg` to the buffer allocated for the calling actor.
inline
actor_ostream
&
operator
<<
(
std
::
string
arg
)
{
actor_ostream
&
operator
<<
(
std
::
string
arg
)
{
return
write
(
std
::
move
(
arg
));
return
write
(
std
::
move
(
arg
));
}
}
...
@@ -79,12 +79,12 @@ public:
...
@@ -79,12 +79,12 @@ public:
/// calling either `std::to_string` or `caf::to_string` depending on
/// calling either `std::to_string` or `caf::to_string` depending on
/// the argument.
/// the argument.
template
<
class
T
>
template
<
class
T
>
inline
actor_ostream
&
operator
<<
(
const
T
&
arg
)
{
actor_ostream
&
operator
<<
(
const
T
&
arg
)
{
return
write
(
deep_to_string
(
arg
));
return
write
(
deep_to_string
(
arg
));
}
}
/// Apply `f` to `*this`.
/// Apply `f` to `*this`.
inline
actor_ostream
&
operator
<<
(
actor_ostream
::
fun_type
f
)
{
actor_ostream
&
operator
<<
(
actor_ostream
::
fun_type
f
)
{
return
f
(
*
this
);
return
f
(
*
this
);
}
}
...
...
libcaf_core/caf/blocking_actor.hpp
View file @
4e4c8732
...
@@ -358,7 +358,7 @@ public:
...
@@ -358,7 +358,7 @@ public:
virtual
mailbox_element_ptr
dequeue
();
virtual
mailbox_element_ptr
dequeue
();
/// Returns the queue for storing incoming messages.
/// Returns the queue for storing incoming messages.
inline
mailbox_type
&
mailbox
()
{
mailbox_type
&
mailbox
()
{
return
mailbox_
;
return
mailbox_
;
}
}
/// @cond PRIVATE
/// @cond PRIVATE
...
@@ -404,11 +404,11 @@ public:
...
@@ -404,11 +404,11 @@ public:
// -- backwards compatibility ------------------------------------------------
// -- backwards compatibility ------------------------------------------------
inline
mailbox_element_ptr
next_message
()
{
mailbox_element_ptr
next_message
()
{
return
dequeue
();
return
dequeue
();
}
}
inline
bool
has_next_message
()
{
bool
has_next_message
()
{
return
!
mailbox_
.
empty
();
return
!
mailbox_
.
empty
();
}
}
...
...
libcaf_core/caf/delegated.hpp
View file @
4e4c8732
...
@@ -28,9 +28,8 @@ class delegated {
...
@@ -28,9 +28,8 @@ class delegated {
// nop
// nop
};
};
template
<
class
...
Ts
>
template
<
class
...
Ts
>
inline
bool
operator
==
(
const
delegated
<
Ts
...
>&
,
const
delegated
<
Ts
...
>&
)
{
bool
operator
==
(
const
delegated
<
Ts
...
>&
,
const
delegated
<
Ts
...
>&
)
{
return
true
;
return
true
;
}
}
...
...
libcaf_core/caf/detail/algorithms.hpp
View file @
4e4c8732
...
@@ -68,7 +68,7 @@ template <class F, class Container>
...
@@ -68,7 +68,7 @@ template <class F, class Container>
struct
container_view
{
struct
container_view
{
Container
&
x
;
Container
&
x
;
using
value_type
=
typename
detail
::
get_callable_trait
<
F
>::
result_type
;
using
value_type
=
typename
detail
::
get_callable_trait
<
F
>::
result_type
;
inline
size_t
size
()
cons
t
{
size_t
size
()
const
noexcep
t
{
return
x
.
size
();
return
x
.
size
();
}
}
value_type
operator
[](
size_t
i
)
{
value_type
operator
[](
size_t
i
)
{
...
...
libcaf_core/caf/detail/behavior_stack.hpp
View file @
4e4c8732
...
@@ -48,25 +48,25 @@ public:
...
@@ -48,25 +48,25 @@ public:
void
clear
();
void
clear
();
inline
bool
empty
()
const
{
bool
empty
()
const
{
return
elements_
.
empty
();
return
elements_
.
empty
();
}
}
inline
behavior
&
back
()
{
behavior
&
back
()
{
CAF_ASSERT
(
!
empty
());
CAF_ASSERT
(
!
empty
());
return
elements_
.
back
();
return
elements_
.
back
();
}
}
inline
void
push_back
(
behavior
&&
what
)
{
void
push_back
(
behavior
&&
what
)
{
elements_
.
emplace_back
(
std
::
move
(
what
));
elements_
.
emplace_back
(
std
::
move
(
what
));
}
}
template
<
class
...
Ts
>
template
<
class
...
Ts
>
inline
void
emplace_back
(
Ts
&&
...
xs
)
{
void
emplace_back
(
Ts
&&
...
xs
)
{
elements_
.
emplace_back
(
std
::
forward
<
Ts
>
(
xs
)...);
elements_
.
emplace_back
(
std
::
forward
<
Ts
>
(
xs
)...);
}
}
inline
void
cleanup
()
{
void
cleanup
()
{
erased_elements_
.
clear
();
erased_elements_
.
clear
();
}
}
...
...
libcaf_core/caf/detail/blocking_behavior.hpp
View file @
4e4c8732
...
@@ -111,7 +111,7 @@ struct make_blocking_behavior_t {
...
@@ -111,7 +111,7 @@ struct make_blocking_behavior_t {
// nop
// nop
}
}
inline
blocking_behavior
operator
()(
behavior
*
x
)
const
{
blocking_behavior
operator
()(
behavior
*
x
)
const
{
CAF_ASSERT
(
x
!=
nullptr
);
CAF_ASSERT
(
x
!=
nullptr
);
return
{
*
x
};
return
{
*
x
};
}
}
...
...
libcaf_core/caf/detail/bounds_checker.hpp
View file @
4e4c8732
...
@@ -27,7 +27,7 @@ namespace caf::detail {
...
@@ -27,7 +27,7 @@ namespace caf::detail {
template
<
class
To
,
bool
LargeUnsigned
=
sizeof
(
To
)
>
=
sizeof
(
int64_t
)
template
<
class
To
,
bool
LargeUnsigned
=
sizeof
(
To
)
>
=
sizeof
(
int64_t
)
&&
std
::
is_unsigned
<
To
>::
value
>
&&
std
::
is_unsigned
<
To
>::
value
>
struct
bounds_checker
{
struct
bounds_checker
{
static
inline
bool
check
(
int64_t
x
)
{
static
constexpr
bool
check
(
int64_t
x
)
noexcept
{
return
x
>=
std
::
numeric_limits
<
To
>::
min
()
return
x
>=
std
::
numeric_limits
<
To
>::
min
()
&&
x
<=
std
::
numeric_limits
<
To
>::
max
();
&&
x
<=
std
::
numeric_limits
<
To
>::
max
();
}
}
...
@@ -35,7 +35,7 @@ struct bounds_checker {
...
@@ -35,7 +35,7 @@ struct bounds_checker {
template
<
class
To
>
template
<
class
To
>
struct
bounds_checker
<
To
,
true
>
{
struct
bounds_checker
<
To
,
true
>
{
static
inline
bool
check
(
int64_t
x
)
{
static
constexpr
bool
check
(
int64_t
x
)
noexcept
{
return
x
>=
0
;
return
x
>=
0
;
}
}
};
};
...
...
libcaf_core/caf/detail/disposer.hpp
View file @
4e4c8732
...
@@ -26,7 +26,7 @@ namespace caf::detail {
...
@@ -26,7 +26,7 @@ namespace caf::detail {
class
disposer
{
class
disposer
{
public:
public:
inline
void
operator
()(
memory_managed
*
ptr
)
const
noexcept
{
void
operator
()(
memory_managed
*
ptr
)
const
noexcept
{
ptr
->
request_deletion
(
false
);
ptr
->
request_deletion
(
false
);
}
}
...
...
libcaf_core/caf/detail/ini_consumer.hpp
View file @
4e4c8732
...
@@ -53,7 +53,7 @@ public:
...
@@ -53,7 +53,7 @@ public:
value_impl
(
config_value
{
std
::
forward
<
T
>
(
x
)});
value_impl
(
config_value
{
std
::
forward
<
T
>
(
x
)});
}
}
inline
abstract_ini_consumer
*
parent
()
{
abstract_ini_consumer
*
parent
()
{
return
parent_
;
return
parent_
;
}
}
...
...
libcaf_core/caf/detail/network_order.hpp
View file @
4e4c8732
...
@@ -53,14 +53,14 @@ inline uint64_t to_network_order(uint64_t value) {
...
@@ -53,14 +53,14 @@ inline uint64_t to_network_order(uint64_t value) {
#else
#else
template
<
class
T
>
template
<
class
T
>
inline
T
to_network_order
(
T
value
)
{
T
to_network_order
(
T
value
)
{
return
value
;
return
value
;
}
}
#endif
#endif
template
<
class
T
>
template
<
class
T
>
inline
T
from_network_order
(
T
value
)
{
T
from_network_order
(
T
value
)
{
// swapping the bytes again gives the native order
// swapping the bytes again gives the native order
return
to_network_order
(
value
);
return
to_network_order
(
value
);
}
}
...
...
libcaf_core/caf/detail/optional_message_visitor.hpp
View file @
4e4c8732
...
@@ -67,25 +67,25 @@ public:
...
@@ -67,25 +67,25 @@ public:
using
opt_msg
=
optional
<
message
>
;
using
opt_msg
=
optional
<
message
>
;
inline
opt_msg
operator
()(
const
none_t
&
)
const
{
opt_msg
operator
()(
const
none_t
&
)
const
{
return
none
;
return
none
;
}
}
inline
opt_msg
operator
()(
const
skip_t
&
)
const
{
opt_msg
operator
()(
const
skip_t
&
)
const
{
return
none
;
return
none
;
}
}
inline
opt_msg
operator
()(
const
unit_t
&
)
const
{
opt_msg
operator
()(
const
unit_t
&
)
const
{
return
message
{};
return
message
{};
}
}
inline
opt_msg
operator
()(
optional
<
skip_t
>&
val
)
const
{
opt_msg
operator
()(
optional
<
skip_t
>&
val
)
const
{
if
(
val
)
if
(
val
)
return
none
;
return
none
;
return
message
{};
return
message
{};
}
}
inline
opt_msg
operator
()(
opt_msg
&
msg
)
{
opt_msg
operator
()(
opt_msg
&
msg
)
{
return
msg
;
return
msg
;
}
}
...
...
libcaf_core/caf/detail/parser/chars.hpp
View file @
4e4c8732
...
@@ -29,15 +29,15 @@ struct any_char_t {};
...
@@ -29,15 +29,15 @@ struct any_char_t {};
constexpr
any_char_t
any_char
=
any_char_t
{};
constexpr
any_char_t
any_char
=
any_char_t
{};
constexpr
bool
in_whitelist
(
any_char_t
,
char
)
{
constexpr
bool
in_whitelist
(
any_char_t
,
char
)
noexcept
{
return
true
;
return
true
;
}
}
constexpr
bool
in_whitelist
(
char
whitelist
,
char
ch
)
{
constexpr
bool
in_whitelist
(
char
whitelist
,
char
ch
)
noexcept
{
return
whitelist
==
ch
;
return
whitelist
==
ch
;
}
}
inline
bool
in_whitelist
(
const
char
*
whitelist
,
char
ch
)
{
inline
bool
in_whitelist
(
const
char
*
whitelist
,
char
ch
)
noexcept
{
// Note: using strchr breaks if `ch == '\0'`.
// Note: using strchr breaks if `ch == '\0'`.
for
(
char
c
=
*
whitelist
++
;
c
!=
'\0'
;
c
=
*
whitelist
++
)
for
(
char
c
=
*
whitelist
++
;
c
!=
'\0'
;
c
=
*
whitelist
++
)
if
(
c
==
ch
)
if
(
c
==
ch
)
...
@@ -45,7 +45,7 @@ inline bool in_whitelist(const char* whitelist, char ch) {
...
@@ -45,7 +45,7 @@ inline bool in_whitelist(const char* whitelist, char ch) {
return
false
;
return
false
;
}
}
inline
bool
in_whitelist
(
bool
(
*
filter
)(
char
),
char
ch
)
{
inline
bool
in_whitelist
(
bool
(
*
filter
)(
char
),
char
ch
)
noexcept
{
return
filter
(
ch
);
return
filter
(
ch
);
}
}
...
...
libcaf_core/caf/detail/parser/is_digit.hpp
View file @
4e4c8732
...
@@ -22,27 +22,18 @@ namespace caf::detail::parser {
...
@@ -22,27 +22,18 @@ namespace caf::detail::parser {
/// Returns whether `c` is a valid digit for a given base.
/// Returns whether `c` is a valid digit for a given base.
template
<
int
Base
>
template
<
int
Base
>
bool
is_digit
(
char
c
);
constexpr
bool
is_digit
(
char
c
)
noexcept
{
if
constexpr
(
Base
==
2
)
{
template
<
>
return
c
==
'0'
||
c
==
'1'
;
inline
bool
is_digit
<
2
>
(
char
c
)
{
}
else
if
constexpr
(
Base
==
8
)
{
return
c
==
'0'
||
c
==
'1'
;
return
c
>=
'0'
&&
c
<=
'7'
;
}
}
else
if
constexpr
(
Base
==
10
)
{
return
c
>=
'0'
&&
c
<=
'9'
;
template
<
>
}
else
{
inline
bool
is_digit
<
8
>
(
char
c
)
{
static_assert
(
Base
==
16
);
return
c
>=
'0'
&&
c
<=
'7'
;
return
(
c
>=
'0'
&&
c
<=
'9'
)
||
(
c
>=
'A'
&&
c
<=
'F'
)
}
||
(
c
>=
'a'
&&
c
<=
'f'
);
}
template
<
>
inline
bool
is_digit
<
10
>
(
char
c
)
{
return
c
>=
'0'
&&
c
<=
'9'
;
}
template
<
>
inline
bool
is_digit
<
16
>
(
char
c
)
{
return
(
c
>=
'0'
&&
c
<=
'9'
)
||
(
c
>=
'A'
&&
c
<=
'F'
)
||
(
c
>=
'a'
&&
c
<=
'f'
);
}
}
}
// namespace caf::detail::parser
}
// namespace caf::detail::parser
libcaf_core/caf/detail/parser/read_ipv6_address.hpp
View file @
4e4c8732
...
@@ -153,7 +153,7 @@ template <class F>
...
@@ -153,7 +153,7 @@ template <class F>
struct
read_ipv6_address_piece_consumer
{
struct
read_ipv6_address_piece_consumer
{
F
callback
;
F
callback
;
inline
void
value
(
uint16_t
x
)
{
void
value
(
uint16_t
x
)
{
union
{
union
{
uint16_t
bits
;
uint16_t
bits
;
std
::
array
<
uint8_t
,
2
>
bytes
;
std
::
array
<
uint8_t
,
2
>
bytes
;
...
@@ -162,7 +162,7 @@ struct read_ipv6_address_piece_consumer {
...
@@ -162,7 +162,7 @@ struct read_ipv6_address_piece_consumer {
callback
(
val
.
bytes
.
data
(),
val
.
bytes
.
size
());
callback
(
val
.
bytes
.
data
(),
val
.
bytes
.
size
());
}
}
inline
void
value
(
uint8_t
x
)
{
void
value
(
uint8_t
x
)
{
callback
(
&
x
,
1
);
callback
(
&
x
,
1
);
}
}
};
};
...
...
libcaf_core/caf/detail/parser/read_uri.hpp
View file @
4e4c8732
...
@@ -66,7 +66,7 @@ void read_uri_percent_encoded(State& ps, std::string& str) {
...
@@ -66,7 +66,7 @@ void read_uri_percent_encoded(State& ps, std::string& str) {
// clang-format on
// clang-format on
}
}
inline
bool
uri_unprotected_char
(
char
c
)
{
inline
bool
uri_unprotected_char
(
char
c
)
noexcept
{
// Consider valid characters not explicitly stated as reserved as unreserved.
// Consider valid characters not explicitly stated as reserved as unreserved.
return
isprint
(
c
)
&&
!
in_whitelist
(
":/?#[]@!$&'()*+,;=<>"
,
c
);
return
isprint
(
c
)
&&
!
in_whitelist
(
":/?#[]@!$&'()*+,;=<>"
,
c
);
}
}
...
...
libcaf_core/caf/detail/pseudo_tuple.hpp
View file @
4e4c8732
...
@@ -45,15 +45,15 @@ struct pseudo_tuple {
...
@@ -45,15 +45,15 @@ struct pseudo_tuple {
data
[
i
]
=
const_cast
<
void
*>
(
xs
.
get
(
i
));
data
[
i
]
=
const_cast
<
void
*>
(
xs
.
get
(
i
));
}
}
inline
const_pointer
at
(
size_t
p
)
const
{
const_pointer
at
(
size_t
p
)
const
{
return
data
[
p
];
return
data
[
p
];
}
}
inline
pointer
get_mutable
(
size_t
p
)
{
pointer
get_mutable
(
size_t
p
)
{
return
data
[
p
];
return
data
[
p
];
}
}
inline
pointer
&
operator
[](
size_t
p
)
{
pointer
&
operator
[](
size_t
p
)
{
return
data
[
p
];
return
data
[
p
];
}
}
};
};
...
...
libcaf_core/caf/detail/scope_guard.hpp
View file @
4e4c8732
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
/// Disables this guard, i.e., the guard does not
/// Disables this guard, i.e., the guard does not
/// run its cleanup code as it goes out of scope.
/// run its cleanup code as it goes out of scope.
inline
void
disable
()
{
void
disable
()
noexcept
{
enabled_
=
false
;
enabled_
=
false
;
}
}
...
...
libcaf_core/caf/detail/split_join.hpp
View file @
4e4c8732
...
@@ -77,7 +77,7 @@ private:
...
@@ -77,7 +77,7 @@ private:
};
};
struct
nop_split
{
struct
nop_split
{
inline
void
operator
()(
actor_msg_vec
&
xs
,
message
&
y
)
const
{
void
operator
()(
actor_msg_vec
&
xs
,
message
&
y
)
const
{
for
(
auto
&
x
:
xs
)
{
for
(
auto
&
x
:
xs
)
{
x
.
second
=
y
;
x
.
second
=
y
;
}
}
...
...
libcaf_core/caf/detail/stream_distribution_tree.hpp
View file @
4e4c8732
...
@@ -67,11 +67,11 @@ public:
...
@@ -67,11 +67,11 @@ public:
// -- Accessors --------------------------------------------------------------
// -- Accessors --------------------------------------------------------------
inline
Policy
&
policy
()
{
Policy
&
policy
()
{
return
policy_
;
return
policy_
;
}
}
inline
const
Policy
&
policy
()
const
{
const
Policy
&
policy
()
const
{
return
policy_
;
return
policy_
;
}
}
...
...
libcaf_core/caf/detail/tick_emitter.hpp
View file @
4e4c8732
...
@@ -62,7 +62,7 @@ public:
...
@@ -62,7 +62,7 @@ public:
void
interval
(
duration_type
x
);
void
interval
(
duration_type
x
);
/// Returns the time interval per tick.
/// Returns the time interval per tick.
inline
duration_type
interval
()
const
{
duration_type
interval
()
const
{
return
interval_
;
return
interval_
;
}
}
...
...
libcaf_core/caf/detail/variant_data.hpp
View file @
4e4c8732
...
@@ -27,11 +27,11 @@
...
@@ -27,11 +27,11 @@
#define CAF_VARIANT_DATA_CONCAT(x, y) x##y
#define CAF_VARIANT_DATA_CONCAT(x, y) x##y
#define CAF_VARIANT_DATA_GETTER(pos) \
#define CAF_VARIANT_DATA_GETTER(pos) \
inline CAF_VARIANT_DATA_CONCAT(T, pos)
\
CAF_VARIANT_DATA_CONCAT(T, pos)
\
& get(std::integral_constant<int, pos>) {
\
&get(std::integral_constant<int, pos>) {
\
return CAF_VARIANT_DATA_CONCAT(v, pos); \
return CAF_VARIANT_DATA_CONCAT(v, pos); \
} \
} \
inline const CAF_VARIANT_DATA_CONCAT(T, pos)
\
const CAF_VARIANT_DATA_CONCAT(T, pos)
\
& get(std::integral_constant<int, pos>) const { \
& get(std::integral_constant<int, pos>) const { \
return CAF_VARIANT_DATA_CONCAT(v, pos); \
return CAF_VARIANT_DATA_CONCAT(v, pos); \
}
}
...
...
libcaf_core/caf/dictionary.hpp
View file @
4e4c8732
...
@@ -69,15 +69,15 @@ public:
...
@@ -69,15 +69,15 @@ public:
using
iterator_bool_pair
=
std
::
pair
<
iterator
,
bool
>
;
using
iterator_bool_pair
=
std
::
pair
<
iterator
,
bool
>
;
struct
mapped_type_less
{
struct
mapped_type_less
{
inline
bool
operator
()(
const
value_type
&
x
,
string_view
y
)
const
{
bool
operator
()(
const
value_type
&
x
,
string_view
y
)
const
{
return
x
.
first
<
y
;
return
x
.
first
<
y
;
}
}
inline
bool
operator
()(
const
value_type
&
x
,
const
value_type
&
y
)
const
{
bool
operator
()(
const
value_type
&
x
,
const
value_type
&
y
)
const
{
return
x
.
first
<
y
.
first
;
return
x
.
first
<
y
.
first
;
}
}
inline
bool
operator
()(
string_view
x
,
const
value_type
&
y
)
const
{
bool
operator
()(
string_view
x
,
const
value_type
&
y
)
const
{
return
x
<
y
.
first
;
return
x
<
y
.
first
;
}
}
};
};
...
@@ -313,17 +313,17 @@ private:
...
@@ -313,17 +313,17 @@ private:
}
}
template
<
size_t
N
>
template
<
size_t
N
>
static
inline
std
::
string
copy
(
const
char
(
&
str
)[
N
])
{
static
std
::
string
copy
(
const
char
(
&
str
)[
N
])
{
return
std
::
string
{
str
};
return
std
::
string
{
str
};
}
}
// Copies the content of `str` into a new string.
// Copies the content of `str` into a new string.
static
inline
std
::
string
copy
(
string_view
str
)
{
static
std
::
string
copy
(
string_view
str
)
{
return
std
::
string
{
str
.
begin
(),
str
.
end
()};
return
std
::
string
{
str
.
begin
(),
str
.
end
()};
}
}
// Moves the content of `str` into a new string.
// Moves the content of `str` into a new string.
static
inline
std
::
string
copy
(
std
::
string
str
)
{
static
std
::
string
copy
(
std
::
string
str
)
{
return
str
;
return
str
;
}
}
...
...
libcaf_core/caf/downstream_manager.hpp
View file @
4e4c8732
...
@@ -163,7 +163,7 @@ public:
...
@@ -163,7 +163,7 @@ public:
virtual
void
abort
(
error
reason
);
virtual
void
abort
(
error
reason
);
/// Returns `num_paths() == 0`.
/// Returns `num_paths() == 0`.
inline
bool
empty
()
const
noexcept
{
bool
empty
()
const
noexcept
{
return
num_paths
()
==
0
;
return
num_paths
()
==
0
;
}
}
...
...
libcaf_core/caf/downstream_manager_base.hpp
View file @
4e4c8732
...
@@ -48,11 +48,11 @@ public:
...
@@ -48,11 +48,11 @@ public:
// -- properties -------------------------------------------------------------
// -- properties -------------------------------------------------------------
inline
const
map_type
&
paths
()
const
{
const
map_type
&
paths
()
const
{
return
paths_
;
return
paths_
;
}
}
inline
map_type
&
paths
()
{
map_type
&
paths
()
{
return
paths_
;
return
paths_
;
}
}
...
...
libcaf_core/caf/error.hpp
View file @
4e4c8732
...
@@ -132,12 +132,12 @@ public:
...
@@ -132,12 +132,12 @@ public:
const
message
&
context
()
const
noexcept
;
const
message
&
context
()
const
noexcept
;
/// Returns `*this != none`.
/// Returns `*this != none`.
inline
explicit
operator
bool
()
const
noexcept
{
explicit
operator
bool
()
const
noexcept
{
return
data_
!=
nullptr
;
return
data_
!=
nullptr
;
}
}
/// Returns `*this == none`.
/// Returns `*this == none`.
inline
bool
operator
!
()
const
noexcept
{
bool
operator
!
()
const
noexcept
{
return
data_
==
nullptr
;
return
data_
==
nullptr
;
}
}
...
@@ -158,7 +158,7 @@ public:
...
@@ -158,7 +158,7 @@ public:
/// @cond PRIVATE
/// @cond PRIVATE
static
inline
error
eval
()
{
static
error
eval
()
{
return
none
;
return
none
;
}
}
...
...
libcaf_core/caf/fused_downstream_manager.hpp
View file @
4e4c8732
...
@@ -63,7 +63,7 @@ private:
...
@@ -63,7 +63,7 @@ private:
};
};
struct
downstream_manager_selector
{
struct
downstream_manager_selector
{
inline
downstream_manager
*
operator
()(
const
message
&
)
{
downstream_manager
*
operator
()(
const
message
&
)
{
return
nullptr
;
return
nullptr
;
}
}
...
...
libcaf_core/caf/group_module.hpp
View file @
4e4c8732
...
@@ -61,12 +61,12 @@ public:
...
@@ -61,12 +61,12 @@ public:
// -- observers --------------------------------------------------------------
// -- observers --------------------------------------------------------------
/// Returns the hosting actor system.
/// Returns the hosting actor system.
inline
actor_system
&
system
()
const
{
actor_system
&
system
()
const
{
return
system_
;
return
system_
;
}
}
/// Returns the name of this module implementation.
/// Returns the name of this module implementation.
inline
const
std
::
string
&
name
()
const
{
const
std
::
string
&
name
()
const
{
return
name_
;
return
name_
;
}
}
...
...
libcaf_core/caf/ipv4_address.hpp
View file @
4e4c8732
...
@@ -65,33 +65,33 @@ public:
...
@@ -65,33 +65,33 @@ public:
/// Returns the bits of the IP address in a single integer arranged in network
/// Returns the bits of the IP address in a single integer arranged in network
/// byte order.
/// byte order.
inline
uint32_t
bits
()
const
noexcept
{
uint32_t
bits
()
const
noexcept
{
return
bits_
;
return
bits_
;
}
}
/// Sets all bits of the IP address with a single 32-bit write. Expects
/// Sets all bits of the IP address with a single 32-bit write. Expects
/// argument in network byte order.
/// argument in network byte order.
inline
void
bits
(
uint32_t
value
)
noexcept
{
void
bits
(
uint32_t
value
)
noexcept
{
bits_
=
value
;
bits_
=
value
;
}
}
/// Returns the bytes of the IP address as array.
/// Returns the bytes of the IP address as array.
inline
array_type
&
bytes
()
noexcept
{
array_type
&
bytes
()
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Returns the bytes of the IP address as array.
/// Returns the bytes of the IP address as array.
inline
const
array_type
&
bytes
()
const
noexcept
{
const
array_type
&
bytes
()
const
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Alias for `bytes()`.
/// Alias for `bytes()`.
inline
array_type
&
data
()
noexcept
{
array_type
&
data
()
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Alias for `bytes()`.
/// Alias for `bytes()`.
inline
const
array_type
&
data
()
const
noexcept
{
const
array_type
&
data
()
const
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
...
...
libcaf_core/caf/ipv4_subnet.hpp
View file @
4e4c8732
...
@@ -41,12 +41,12 @@ public:
...
@@ -41,12 +41,12 @@ public:
// -- properties -------------------------------------------------------------
// -- properties -------------------------------------------------------------
/// Returns the network address for this subnet.
/// Returns the network address for this subnet.
inline
const
ipv4_address
&
network_address
()
const
noexcept
{
const
ipv4_address
&
network_address
()
const
noexcept
{
return
address_
;
return
address_
;
}
}
/// Returns the prefix length of the netmask in bits.
/// Returns the prefix length of the netmask in bits.
inline
uint8_t
prefix_length
()
const
noexcept
{
uint8_t
prefix_length
()
const
noexcept
{
return
prefix_length_
;
return
prefix_length_
;
}
}
...
...
libcaf_core/caf/ipv6_address.hpp
View file @
4e4c8732
...
@@ -89,27 +89,27 @@ public:
...
@@ -89,27 +89,27 @@ public:
bool
is_loopback
()
const
noexcept
;
bool
is_loopback
()
const
noexcept
;
/// Returns the bytes of the IP address as array.
/// Returns the bytes of the IP address as array.
inline
array_type
&
bytes
()
noexcept
{
array_type
&
bytes
()
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Returns the bytes of the IP address as array.
/// Returns the bytes of the IP address as array.
inline
const
array_type
&
bytes
()
const
noexcept
{
const
array_type
&
bytes
()
const
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Alias for `bytes()`.
/// Alias for `bytes()`.
inline
array_type
&
data
()
noexcept
{
array_type
&
data
()
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Alias for `bytes()`.
/// Alias for `bytes()`.
inline
const
array_type
&
data
()
const
noexcept
{
const
array_type
&
data
()
const
noexcept
{
return
bytes_
;
return
bytes_
;
}
}
/// Returns whether this address contains only zeros, i.e., equals `::`.
/// Returns whether this address contains only zeros, i.e., equals `::`.
inline
bool
zero
()
const
noexcept
{
bool
zero
()
const
noexcept
{
return
half_segments_
[
0
]
==
0
&&
half_segments_
[
1
]
==
0
;
return
half_segments_
[
0
]
==
0
&&
half_segments_
[
1
]
==
0
;
}
}
...
...
libcaf_core/caf/ipv6_subnet.hpp
View file @
4e4c8732
...
@@ -62,12 +62,12 @@ public:
...
@@ -62,12 +62,12 @@ public:
ipv4_subnet
embedded_v4
()
const
noexcept
;
ipv4_subnet
embedded_v4
()
const
noexcept
;
/// Returns the network address for this subnet.
/// Returns the network address for this subnet.
inline
const
ipv6_address
&
network_address
()
const
noexcept
{
const
ipv6_address
&
network_address
()
const
noexcept
{
return
address_
;
return
address_
;
}
}
/// Returns the prefix length of the netmask.
/// Returns the prefix length of the netmask.
inline
uint8_t
prefix_length
()
const
noexcept
{
uint8_t
prefix_length
()
const
noexcept
{
return
prefix_length_
;
return
prefix_length_
;
}
}
...
...
libcaf_core/caf/no_stages.hpp
View file @
4e4c8732
...
@@ -28,7 +28,7 @@ struct no_stages_t {
...
@@ -28,7 +28,7 @@ struct no_stages_t {
// nop
// nop
}
}
inline
operator
mailbox_element
::
forwarding_stack
()
const
{
operator
mailbox_element
::
forwarding_stack
()
const
{
return
{};
return
{};
}
}
};
};
...
...
libcaf_core/caf/policy/downstream_messages.hpp
View file @
4e4c8732
...
@@ -113,7 +113,7 @@ public:
...
@@ -113,7 +113,7 @@ public:
// -- required functions for drr_queue ---------------------------------------
// -- required functions for drr_queue ---------------------------------------
static
inline
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
static
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
return
1
;
return
1
;
}
}
};
};
...
...
libcaf_core/caf/policy/normal_messages.hpp
View file @
4e4c8732
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
// -- interface required by drr_queue ----------------------------------------
// -- interface required by drr_queue ----------------------------------------
static
inline
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
static
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
return
1
;
return
1
;
}
}
};
};
...
...
libcaf_core/caf/policy/upstream_messages.hpp
View file @
4e4c8732
...
@@ -53,7 +53,7 @@ public:
...
@@ -53,7 +53,7 @@ public:
// -- interface required by drr_queue ----------------------------------------
// -- interface required by drr_queue ----------------------------------------
static
inline
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
static
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
return
1
;
return
1
;
}
}
};
};
...
...
libcaf_core/caf/policy/urgent_messages.hpp
View file @
4e4c8732
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
// -- interface required by drr_queue ----------------------------------------
// -- interface required by drr_queue ----------------------------------------
static
inline
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
static
task_size_type
task_size
(
const
mailbox_element
&
)
noexcept
{
return
1
;
return
1
;
}
}
};
};
...
...
libcaf_core/caf/policy/work_sharing.hpp
View file @
4e4c8732
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
~
work_sharing
()
override
;
~
work_sharing
()
override
;
struct
coordinator_data
{
struct
coordinator_data
{
inline
explicit
coordinator_data
(
scheduler
::
abstract_coordinator
*
)
{
explicit
coordinator_data
(
scheduler
::
abstract_coordinator
*
)
{
// nop
// nop
}
}
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
};
};
struct
worker_data
{
struct
worker_data
{
inline
explicit
worker_data
(
scheduler
::
abstract_coordinator
*
)
{
explicit
worker_data
(
scheduler
::
abstract_coordinator
*
)
{
// nop
// nop
}
}
};
};
...
...
libcaf_core/caf/policy/work_stealing.hpp
View file @
4e4c8732
...
@@ -62,7 +62,7 @@ public:
...
@@ -62,7 +62,7 @@ public:
// The coordinator has only a counter for round-robin enqueue to its workers.
// The coordinator has only a counter for round-robin enqueue to its workers.
struct
coordinator_data
{
struct
coordinator_data
{
inline
explicit
coordinator_data
(
scheduler
::
abstract_coordinator
*
)
explicit
coordinator_data
(
scheduler
::
abstract_coordinator
*
)
:
next_worker
(
0
)
{
:
next_worker
(
0
)
{
// nop
// nop
}
}
...
...
libcaf_core/caf/ref_counted.hpp
View file @
4e4c8732
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
ref_counted
&
operator
=
(
const
ref_counted
&
);
ref_counted
&
operator
=
(
const
ref_counted
&
);
/// Increases reference count by one.
/// Increases reference count by one.
inline
void
ref
()
const
noexcept
{
void
ref
()
const
noexcept
{
rc_
.
fetch_add
(
1
,
std
::
memory_order_relaxed
);
rc_
.
fetch_add
(
1
,
std
::
memory_order_relaxed
);
}
}
...
@@ -48,11 +48,11 @@ public:
...
@@ -48,11 +48,11 @@ public:
void
deref
()
const
noexcept
;
void
deref
()
const
noexcept
;
/// Queries whether there is exactly one reference.
/// Queries whether there is exactly one reference.
inline
bool
unique
()
const
noexcept
{
bool
unique
()
const
noexcept
{
return
rc_
==
1
;
return
rc_
==
1
;
}
}
inline
size_t
get_reference_count
()
const
noexcept
{
size_t
get_reference_count
()
const
noexcept
{
return
rc_
;
return
rc_
;
}
}
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
4e4c8732
...
@@ -299,24 +299,24 @@ public:
...
@@ -299,24 +299,24 @@ public:
// -- properties -------------------------------------------------------------
// -- properties -------------------------------------------------------------
/// Returns the queue for storing incoming messages.
/// Returns the queue for storing incoming messages.
inline
mailbox_type
&
mailbox
()
noexcept
{
mailbox_type
&
mailbox
()
noexcept
{
return
mailbox_
;
return
mailbox_
;
}
}
/// Returns map for all active streams.
/// Returns map for all active streams.
inline
stream_manager_map
&
stream_managers
()
noexcept
{
stream_manager_map
&
stream_managers
()
noexcept
{
return
stream_managers_
;
return
stream_managers_
;
}
}
/// Returns map for all pending streams.
/// Returns map for all pending streams.
inline
stream_manager_map
&
pending_stream_managers
()
noexcept
{
stream_manager_map
&
pending_stream_managers
()
noexcept
{
return
pending_stream_managers_
;
return
pending_stream_managers_
;
}
}
// -- event handlers ---------------------------------------------------------
// -- event handlers ---------------------------------------------------------
/// Sets a custom handler for unexpected messages.
/// Sets a custom handler for unexpected messages.
inline
void
set_default_handler
(
default_handler
fun
)
{
void
set_default_handler
(
default_handler
fun
)
{
if
(
fun
)
if
(
fun
)
default_handler_
=
std
::
move
(
fun
);
default_handler_
=
std
::
move
(
fun
);
else
else
...
@@ -332,7 +332,7 @@ public:
...
@@ -332,7 +332,7 @@ public:
}
}
/// Sets a custom handler for error messages.
/// Sets a custom handler for error messages.
inline
void
set_error_handler
(
error_handler
fun
)
{
void
set_error_handler
(
error_handler
fun
)
{
if
(
fun
)
if
(
fun
)
error_handler_
=
std
::
move
(
fun
);
error_handler_
=
std
::
move
(
fun
);
else
else
...
@@ -346,7 +346,7 @@ public:
...
@@ -346,7 +346,7 @@ public:
}
}
/// Sets a custom handler for down messages.
/// Sets a custom handler for down messages.
inline
void
set_down_handler
(
down_handler
fun
)
{
void
set_down_handler
(
down_handler
fun
)
{
if
(
fun
)
if
(
fun
)
down_handler_
=
std
::
move
(
fun
);
down_handler_
=
std
::
move
(
fun
);
else
else
...
@@ -376,7 +376,7 @@ public:
...
@@ -376,7 +376,7 @@ public:
}
}
/// Sets a custom handler for error messages.
/// Sets a custom handler for error messages.
inline
void
set_exit_handler
(
exit_handler
fun
)
{
void
set_exit_handler
(
exit_handler
fun
)
{
if
(
fun
)
if
(
fun
)
exit_handler_
=
std
::
move
(
fun
);
exit_handler_
=
std
::
move
(
fun
);
else
else
...
@@ -392,7 +392,7 @@ public:
...
@@ -392,7 +392,7 @@ public:
#ifdef CAF_ENABLE_EXCEPTIONS
#ifdef CAF_ENABLE_EXCEPTIONS
/// Sets a custom exception handler for this actor. If multiple handlers are
/// Sets a custom exception handler for this actor. If multiple handlers are
/// defined, only the functor that was added *last* is being executed.
/// defined, only the functor that was added *last* is being executed.
inline
void
set_exception_handler
(
exception_handler
fun
)
{
void
set_exception_handler
(
exception_handler
fun
)
{
if
(
fun
)
if
(
fun
)
exception_handler_
=
std
::
move
(
fun
);
exception_handler_
=
std
::
move
(
fun
);
else
else
...
@@ -461,11 +461,11 @@ public:
...
@@ -461,11 +461,11 @@ public:
// -- behavior management ----------------------------------------------------
// -- behavior management ----------------------------------------------------
/// Returns `true` if the behavior stack is not empty.
/// Returns `true` if the behavior stack is not empty.
inline
bool
has_behavior
()
const
noexcept
{
bool
has_behavior
()
const
noexcept
{
return
!
bhvr_stack_
.
empty
();
return
!
bhvr_stack_
.
empty
();
}
}
inline
behavior
&
current_behavior
()
{
behavior
&
current_behavior
()
{
return
!
awaited_responses_
.
empty
()
?
awaited_responses_
.
front
().
second
return
!
awaited_responses_
.
empty
()
?
awaited_responses_
.
front
().
second
:
bhvr_stack_
.
back
();
:
bhvr_stack_
.
back
();
}
}
...
@@ -479,7 +479,7 @@ public:
...
@@ -479,7 +479,7 @@ public:
bool
finalize
();
bool
finalize
();
/// Returns the behavior stack.
/// Returns the behavior stack.
inline
detail
::
behavior_stack
&
bhvr_stack
()
{
detail
::
behavior_stack
&
bhvr_stack
()
{
return
bhvr_stack_
;
return
bhvr_stack_
;
}
}
...
@@ -643,7 +643,7 @@ public:
...
@@ -643,7 +643,7 @@ public:
/// Returns `true` if the actor has a behavior, awaits responses, or
/// Returns `true` if the actor has a behavior, awaits responses, or
/// participates in streams.
/// participates in streams.
/// @private
/// @private
inline
bool
alive
()
const
noexcept
{
bool
alive
()
const
noexcept
{
return
!
bhvr_stack_
.
empty
()
||
!
awaited_responses_
.
empty
()
return
!
bhvr_stack_
.
empty
()
||
!
awaited_responses_
.
empty
()
||
!
multiplexed_responses_
.
empty
()
||
!
stream_managers_
.
empty
()
||
!
multiplexed_responses_
.
empty
()
||
!
stream_managers_
.
empty
()
||
!
pending_stream_managers_
.
empty
();
||
!
pending_stream_managers_
.
empty
();
...
...
libcaf_core/caf/scheduler/abstract_coordinator.hpp
View file @
4e4c8732
...
@@ -44,29 +44,29 @@ public:
...
@@ -44,29 +44,29 @@ public:
explicit
abstract_coordinator
(
actor_system
&
sys
);
explicit
abstract_coordinator
(
actor_system
&
sys
);
/// Returns a handle to the central printing actor.
/// Returns a handle to the central printing actor.
inline
actor
printer
()
const
{
actor
printer
()
const
{
return
actor_cast
<
actor
>
(
utility_actors_
[
printer_id
]);
return
actor_cast
<
actor
>
(
utility_actors_
[
printer_id
]);
}
}
/// Returns the number of utility actors.
/// Returns the number of utility actors.
inline
size_t
num_utility_actors
()
const
{
size_t
num_utility_actors
()
const
{
return
utility_actors_
.
size
();
return
utility_actors_
.
size
();
}
}
/// Puts `what` into the queue of a randomly chosen worker.
/// Puts `what` into the queue of a randomly chosen worker.
virtual
void
enqueue
(
resumable
*
what
)
=
0
;
virtual
void
enqueue
(
resumable
*
what
)
=
0
;
inline
actor_system
&
system
()
{
actor_system
&
system
()
{
return
system_
;
return
system_
;
}
}
const
actor_system_config
&
config
()
const
;
const
actor_system_config
&
config
()
const
;
inline
size_t
max_throughput
()
const
{
size_t
max_throughput
()
const
{
return
max_throughput_
;
return
max_throughput_
;
}
}
inline
size_t
num_workers
()
const
{
size_t
num_workers
()
const
{
return
num_workers_
;
return
num_workers_
;
}
}
...
...
libcaf_core/caf/scheduler/test_coordinator.hpp
View file @
4e4c8732
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
std
::
deque
<
resumable
*>
jobs
;
std
::
deque
<
resumable
*>
jobs
;
/// Returns whether at least one job is in the queue.
/// Returns whether at least one job is in the queue.
inline
bool
has_job
()
const
{
bool
has_job
()
const
{
return
!
jobs
.
empty
();
return
!
jobs
.
empty
();
}
}
...
...
libcaf_core/caf/scoped_actor.hpp
View file @
4e4c8732
...
@@ -50,30 +50,30 @@ public:
...
@@ -50,30 +50,30 @@ public:
~
scoped_actor
();
~
scoped_actor
();
inline
explicit
operator
bool
()
const
{
explicit
operator
bool
()
const
{
return
static_cast
<
bool
>
(
self_
);
return
static_cast
<
bool
>
(
self_
);
}
}
inline
actor_system
&
home_system
()
const
{
actor_system
&
home_system
()
const
{
return
*
self_
->
home_system
;
return
*
self_
->
home_system
;
}
}
inline
blocking_actor
*
operator
->
()
const
{
blocking_actor
*
operator
->
()
const
{
return
ptr
();
return
ptr
();
}
}
inline
blocking_actor
&
operator
*
()
const
{
blocking_actor
&
operator
*
()
const
{
return
*
ptr
();
return
*
ptr
();
}
}
inline
actor_addr
address
()
const
{
actor_addr
address
()
const
{
return
ptr
()
->
address
();
return
ptr
()
->
address
();
}
}
blocking_actor
*
ptr
()
const
;
blocking_actor
*
ptr
()
const
;
private:
private:
inline
actor_control_block
*
get
()
const
{
actor_control_block
*
get
()
const
{
return
self_
.
get
();
return
self_
.
get
();
}
}
...
...
libcaf_core/caf/stream_slot.hpp
View file @
4e4c8732
...
@@ -55,7 +55,7 @@ struct stream_slots : detail::comparable<stream_slots> {
...
@@ -55,7 +55,7 @@ struct stream_slots : detail::comparable<stream_slots> {
return
{
receiver
,
sender
};
return
{
receiver
,
sender
};
}
}
inline
long
compare
(
stream_slots
other
)
const
noexcept
{
long
compare
(
stream_slots
other
)
const
noexcept
{
static_assert
(
sizeof
(
long
)
>=
sizeof
(
int32_t
),
static_assert
(
sizeof
(
long
)
>=
sizeof
(
int32_t
),
"sizeof(long) < sizeof(int32_t)"
);
"sizeof(long) < sizeof(int32_t)"
);
long
x
=
(
sender
<<
16
)
|
receiver
;
long
x
=
(
sender
<<
16
)
|
receiver
;
...
...
libcaf_core/caf/string_algorithms.hpp
View file @
4e4c8732
...
@@ -34,7 +34,7 @@ namespace caf {
...
@@ -34,7 +34,7 @@ namespace caf {
// provide boost::split compatible interface
// provide boost::split compatible interface
inline
string_view
is_any_of
(
string_view
arg
)
{
constexpr
string_view
is_any_of
(
string_view
arg
)
noexcept
{
return
arg
;
return
arg
;
}
}
...
...
libcaf_core/caf/type_erased_value.hpp
View file @
4e4c8732
...
@@ -77,12 +77,12 @@ public:
...
@@ -77,12 +77,12 @@ public:
// -- convenience functions --------------------------------------------------
// -- convenience functions --------------------------------------------------
/// Returns the type number for the stored value.
/// Returns the type number for the stored value.
inline
uint16_t
type_nr
()
const
{
uint16_t
type_nr
()
const
{
return
type
().
first
;
return
type
().
first
;
}
}
/// Checks whether the type of the stored value matches `rtti`.
/// Checks whether the type of the stored value matches `rtti`.
inline
bool
matches
(
const
rtti_pair
&
rtti
)
const
{
bool
matches
(
const
rtti_pair
&
rtti
)
const
{
return
matches
(
rtti
.
first
,
rtti
.
second
);
return
matches
(
rtti
.
first
,
rtti
.
second
);
}
}
...
...
libcaf_core/caf/typed_actor.hpp
View file @
4e4c8732
...
@@ -157,18 +157,18 @@ public:
...
@@ -157,18 +157,18 @@ public:
return
*
this
;
return
*
this
;
}
}
inline
typed_actor
&
operator
=
(
std
::
nullptr_t
)
{
typed_actor
&
operator
=
(
std
::
nullptr_t
)
{
ptr_
.
reset
();
ptr_
.
reset
();
return
*
this
;
return
*
this
;
}
}
/// Queries whether this actor handle is valid.
/// Queries whether this actor handle is valid.
inline
explicit
operator
bool
()
const
{
explicit
operator
bool
()
const
{
return
static_cast
<
bool
>
(
ptr_
);
return
static_cast
<
bool
>
(
ptr_
);
}
}
/// Queries whether this actor handle is invalid.
/// Queries whether this actor handle is invalid.
inline
bool
operator
!
()
const
{
bool
operator
!
()
const
{
return
!
ptr_
;
return
!
ptr_
;
}
}
...
@@ -188,7 +188,7 @@ public:
...
@@ -188,7 +188,7 @@ public:
}
}
/// Returns the hosting actor system.
/// Returns the hosting actor system.
inline
actor_system
&
home_system
()
const
noexcept
{
actor_system
&
home_system
()
const
noexcept
{
return
*
ptr_
->
home_system
;
return
*
ptr_
->
home_system
;
}
}
...
@@ -227,11 +227,11 @@ public:
...
@@ -227,11 +227,11 @@ public:
// nop
// nop
}
}
friend
inline
std
::
string
to_string
(
const
typed_actor
&
x
)
{
friend
std
::
string
to_string
(
const
typed_actor
&
x
)
{
return
to_string
(
x
.
ptr_
);
return
to_string
(
x
.
ptr_
);
}
}
friend
inline
void
append_to_string
(
std
::
string
&
x
,
const
typed_actor
&
y
)
{
friend
void
append_to_string
(
std
::
string
&
x
,
const
typed_actor
&
y
)
{
return
append_to_string
(
x
,
y
.
ptr_
);
return
append_to_string
(
x
,
y
.
ptr_
);
}
}
...
...
libcaf_core/caf/typed_response_promise.hpp
View file @
4e4c8732
...
@@ -33,8 +33,8 @@ public:
...
@@ -33,8 +33,8 @@ public:
/// Constructs an invalid response promise.
/// Constructs an invalid response promise.
typed_response_promise
()
=
default
;
typed_response_promise
()
=
default
;
inline
typed_response_promise
(
strong_actor_ptr
self
,
mailbox_element
&
src
)
typed_response_promise
(
strong_actor_ptr
self
,
mailbox_element
&
src
)
:
promise_
(
std
::
move
(
self
),
src
)
{
:
promise_
(
std
::
move
(
self
),
src
)
{
// nop
// nop
}
}
...
@@ -44,16 +44,15 @@ public:
...
@@ -44,16 +44,15 @@ public:
typed_response_promise
&
operator
=
(
const
typed_response_promise
&
)
=
default
;
typed_response_promise
&
operator
=
(
const
typed_response_promise
&
)
=
default
;
/// Implicitly convertible to untyped response promise.
/// Implicitly convertible to untyped response promise.
inline
operator
response_promise
&
()
{
operator
response_promise
&
()
{
return
promise_
;
return
promise_
;
}
}
/// Satisfies the promise by sending a non-error response message.
/// Satisfies the promise by sending a non-error response message.
template
<
class
U
,
class
...
Us
>
template
<
class
U
,
class
...
Us
>
typename
std
::
enable_if
<
typename
std
::
enable_if
<
(
sizeof
...(
Us
)
>
0
)
(
sizeof
...(
Us
)
>
0
)
||
!
std
::
is_convertible
<
U
,
error
>::
value
,
||
!
std
::
is_convertible
<
U
,
error
>::
value
,
typed_response_promise
typed_response_promise
>::
type
>::
type
deliver
(
U
&&
x
,
Us
&&
...
xs
)
{
deliver
(
U
&&
x
,
Us
&&
...
xs
)
{
static_assert
(
static_assert
(
std
::
is_same
<
detail
::
type_list
<
Ts
...
>
,
std
::
is_same
<
detail
::
type_list
<
Ts
...
>
,
...
@@ -64,8 +63,8 @@ public:
...
@@ -64,8 +63,8 @@ public:
return
*
this
;
return
*
this
;
}
}
template
<
message_priority
P
=
message_priority
::
normal
,
template
<
message_priority
P
=
message_priority
::
normal
,
class
Handle
=
actor
,
class
Handle
=
actor
,
class
...
Us
>
class
...
Us
>
typed_response_promise
delegate
(
const
Handle
&
dest
,
Us
&&
...
xs
)
{
typed_response_promise
delegate
(
const
Handle
&
dest
,
Us
&&
...
xs
)
{
promise_
.
template
delegate
<
P
>(
dest
,
std
::
forward
<
Us
>
(
xs
)...);
promise_
.
template
delegate
<
P
>(
dest
,
std
::
forward
<
Us
>
(
xs
)...);
return
*
this
;
return
*
this
;
...
@@ -73,13 +72,13 @@ public:
...
@@ -73,13 +72,13 @@ public:
/// Satisfies the promise by sending an error response message.
/// Satisfies the promise by sending an error response message.
/// For non-requests, nothing is done.
/// For non-requests, nothing is done.
inline
typed_response_promise
deliver
(
error
x
)
{
typed_response_promise
deliver
(
error
x
)
{
promise_
.
deliver
(
std
::
move
(
x
));
promise_
.
deliver
(
std
::
move
(
x
));
return
*
this
;
return
*
this
;
}
}
/// Queries whether this promise is a valid promise that is not satisfied yet.
/// Queries whether this promise is a valid promise that is not satisfied yet.
inline
bool
pending
()
const
{
bool
pending
()
const
{
return
promise_
.
pending
();
return
promise_
.
pending
();
}
}
...
@@ -88,4 +87,3 @@ private:
...
@@ -88,4 +87,3 @@ private:
};
};
}
// namespace caf
}
// namespace caf
libcaf_core/caf/uri.hpp
View file @
4e4c8732
...
@@ -52,7 +52,7 @@ public:
...
@@ -52,7 +52,7 @@ public:
host_type
host
;
host_type
host
;
uint16_t
port
;
uint16_t
port
;
inline
authority_type
()
:
port
(
0
)
{
authority_type
()
:
port
(
0
)
{
// nop
// nop
}
}
...
...
libcaf_core/caf/variant.hpp
View file @
4e4c8732
...
@@ -214,11 +214,11 @@ public:
...
@@ -214,11 +214,11 @@ public:
/// @cond PRIVATE
/// @cond PRIVATE
inline
variant
&
get_data
()
{
variant
&
get_data
()
{
return
*
this
;
return
*
this
;
}
}
inline
const
variant
&
get_data
()
const
{
const
variant
&
get_data
()
const
{
return
*
this
;
return
*
this
;
}
}
...
@@ -300,7 +300,7 @@ public:
...
@@ -300,7 +300,7 @@ public:
/// @endcond
/// @endcond
private:
private:
inline
void
destroy_data
()
{
void
destroy_data
()
{
if
(
type_
==
variant_npos
)
return
;
// nothing to do
if
(
type_
==
variant_npos
)
return
;
// nothing to do
detail
::
variant_data_destructor
f
;
detail
::
variant_data_destructor
f
;
apply
<
void
>
(
f
);
apply
<
void
>
(
f
);
...
...
libcaf_io/caf/io/abstract_broker.hpp
View file @
4e4c8732
...
@@ -177,7 +177,7 @@ public:
...
@@ -177,7 +177,7 @@ public:
void
flush
(
datagram_handle
hdl
);
void
flush
(
datagram_handle
hdl
);
/// Returns the middleman instance this broker belongs to.
/// Returns the middleman instance this broker belongs to.
inline
middleman
&
parent
()
{
middleman
&
parent
()
{
return
system
().
middleman
();
return
system
().
middleman
();
}
}
...
@@ -349,7 +349,7 @@ public:
...
@@ -349,7 +349,7 @@ public:
// -- observers --------------------------------------------------------------
// -- observers --------------------------------------------------------------
/// Returns the number of open connections.
/// Returns the number of open connections.
inline
size_t
num_connections
()
const
{
size_t
num_connections
()
const
{
return
scribes_
.
size
();
return
scribes_
.
size
();
}
}
...
@@ -374,16 +374,16 @@ protected:
...
@@ -374,16 +374,16 @@ protected:
/// @cond PRIVATE
/// @cond PRIVATE
// meta programming utility
// meta programming utility
inline
doorman_map
&
get_map
(
accept_handle
)
{
doorman_map
&
get_map
(
accept_handle
)
{
return
doormen_
;
return
doormen_
;
}
}
// meta programming utility
// meta programming utility
inline
scribe_map
&
get_map
(
connection_handle
)
{
scribe_map
&
get_map
(
connection_handle
)
{
return
scribes_
;
return
scribes_
;
}
}
inline
datagram_servant_map
&
get_map
(
datagram_handle
)
{
datagram_servant_map
&
get_map
(
datagram_handle
)
{
return
datagram_servants_
;
return
datagram_servants_
;
}
}
/// @endcond
/// @endcond
...
@@ -399,7 +399,7 @@ protected:
...
@@ -399,7 +399,7 @@ protected:
}
}
private:
private:
inline
void
launch_servant
(
scribe_ptr
&
)
{
void
launch_servant
(
scribe_ptr
&
)
{
// nop
// nop
}
}
...
...
libcaf_io/caf/io/accept_handle.hpp
View file @
4e4c8732
...
@@ -59,7 +59,7 @@ public:
...
@@ -59,7 +59,7 @@ public:
}
}
private:
private:
inline
accept_handle
(
int64_t
handle_id
)
:
super
(
handle_id
)
{
accept_handle
(
int64_t
handle_id
)
:
super
(
handle_id
)
{
// nop
// nop
}
}
};
};
...
...
libcaf_io/caf/io/basp/connection_state.hpp
View file @
4e4c8732
...
@@ -53,7 +53,7 @@ enum connection_state {
...
@@ -53,7 +53,7 @@ enum connection_state {
/// Returns whether the connection state requries a shutdown of the socket
/// Returns whether the connection state requries a shutdown of the socket
/// connection.
/// connection.
inline
bool
requires_shutdown
(
connection_state
x
)
{
constexpr
bool
requires_shutdown
(
connection_state
x
)
noexcept
{
// Any enum value other than await_header (0) and await_payload (1) signal the
// Any enum value other than await_header (0) and await_payload (1) signal the
// BASP broker to shutdown the connection.
// BASP broker to shutdown the connection.
return
static_cast
<
int
>
(
x
)
>
1
;
return
static_cast
<
int
>
(
x
)
>
1
;
...
@@ -61,7 +61,7 @@ inline bool requires_shutdown(connection_state x) {
...
@@ -61,7 +61,7 @@ inline bool requires_shutdown(connection_state x) {
/// Converts the connection state to a system error code if it holds one of the
/// Converts the connection state to a system error code if it holds one of the
/// overlapping values. Otherwise returns `sec::none`.
/// overlapping values. Otherwise returns `sec::none`.
inline
sec
to_sec
(
connection_state
x
)
{
inline
sec
to_sec
(
connection_state
x
)
noexcept
{
switch
(
x
)
{
switch
(
x
)
{
default:
default:
return
sec
::
none
;
return
sec
::
none
;
...
...
libcaf_io/caf/io/broker_servant.hpp
View file @
4e4c8732
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
this
->
add_to_loop
();
this
->
add_to_loop
();
}
}
inline
optional
<
size_t
>
activity_tokens
()
const
{
optional
<
size_t
>
activity_tokens
()
const
{
return
activity_tokens_
;
return
activity_tokens_
;
}
}
...
...
libcaf_io/caf/io/connect.hpp
View file @
4e4c8732
...
@@ -30,8 +30,8 @@ namespace caf::io {
...
@@ -30,8 +30,8 @@ namespace caf::io {
/// Tries to connect to given node.
/// Tries to connect to given node.
/// @experimental
/// @experimental
inline
expected
<
node_id
>
inline
expected
<
node_id
>
connect
(
actor_system
&
sys
,
std
::
string
host
,
connect
(
actor_system
&
sys
,
std
::
string
host
,
uint16_t
port
)
{
uint16_t
port
)
{
return
sys
.
middleman
().
connect
(
std
::
move
(
host
),
port
);
return
sys
.
middleman
().
connect
(
std
::
move
(
host
),
port
);
}
}
...
...
libcaf_io/caf/io/connection_handle.hpp
View file @
4e4c8732
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
}
}
private:
private:
inline
connection_handle
(
int64_t
handle_id
)
:
super
(
handle_id
)
{
connection_handle
(
int64_t
handle_id
)
:
super
(
handle_id
)
{
// nop
// nop
}
}
};
};
...
...
libcaf_io/caf/io/datagram_handle.hpp
View file @
4e4c8732
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
}
}
private:
private:
inline
datagram_handle
(
int64_t
handle_id
)
:
super
{
handle_id
}
{
datagram_handle
(
int64_t
handle_id
)
:
super
{
handle_id
}
{
// nop
// nop
}
}
};
};
...
...
libcaf_io/caf/io/middleman.hpp
View file @
4e4c8732
...
@@ -115,12 +115,12 @@ public:
...
@@ -115,12 +115,12 @@ public:
const
std
::
string
&
host
,
uint16_t
port
);
const
std
::
string
&
host
,
uint16_t
port
);
/// Returns the enclosing actor system.
/// Returns the enclosing actor system.
inline
actor_system
&
system
()
{
actor_system
&
system
()
{
return
system_
;
return
system_
;
}
}
/// Returns the systemw-wide configuration.
/// Returns the systemw-wide configuration.
inline
const
actor_system_config
&
config
()
const
{
const
actor_system_config
&
config
()
const
{
return
system_
.
config
();
return
system_
.
config
();
}
}
...
...
libcaf_io/caf/io/network/acceptor.hpp
View file @
4e4c8732
...
@@ -42,7 +42,7 @@ public:
...
@@ -42,7 +42,7 @@ public:
/// Returns the accepted socket. This member function should
/// Returns the accepted socket. This member function should
/// be called only from the `new_connection` callback.
/// be called only from the `new_connection` callback.
inline
native_socket
&
accepted_socket
()
{
native_socket
&
accepted_socket
()
{
return
sock_
;
return
sock_
;
}
}
...
...
libcaf_io/caf/io/network/default_multiplexer.hpp
View file @
4e4c8732
...
@@ -102,13 +102,13 @@ public:
...
@@ -102,13 +102,13 @@ public:
};
};
struct
event_less
{
struct
event_less
{
inline
bool
operator
()(
native_socket
lhs
,
const
event
&
rhs
)
cons
t
{
bool
operator
()(
native_socket
lhs
,
const
event
&
rhs
)
const
noexcep
t
{
return
lhs
<
rhs
.
fd
;
return
lhs
<
rhs
.
fd
;
}
}
inline
bool
operator
()(
const
event
&
lhs
,
native_socket
rhs
)
cons
t
{
bool
operator
()(
const
event
&
lhs
,
native_socket
rhs
)
const
noexcep
t
{
return
lhs
.
fd
<
rhs
;
return
lhs
.
fd
<
rhs
;
}
}
inline
bool
operator
()(
const
event
&
lhs
,
const
event
&
rhs
)
cons
t
{
bool
operator
()(
const
event
&
lhs
,
const
event
&
rhs
)
const
noexcep
t
{
return
lhs
.
fd
<
rhs
.
fd
;
return
lhs
.
fd
<
rhs
.
fd
;
}
}
};
};
...
...
libcaf_io/caf/io/network/manager.hpp
View file @
4e4c8732
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
abstract_broker
*
parent
();
abstract_broker
*
parent
();
/// Returns `true` if this manager has a parent, `false` otherwise.
/// Returns `true` if this manager has a parent, `false` otherwise.
inline
bool
detached
()
const
{
bool
detached
()
const
{
return
!
parent_
;
return
!
parent_
;
}
}
...
...
libcaf_io/caf/io/network/multiplexer.hpp
View file @
4e4c8732
...
@@ -154,11 +154,11 @@ public:
...
@@ -154,11 +154,11 @@ public:
/// compiled using the default backend.
/// compiled using the default backend.
virtual
multiplexer_backend
*
pimpl
();
virtual
multiplexer_backend
*
pimpl
();
inline
const
std
::
thread
::
id
&
thread_id
()
const
{
const
std
::
thread
::
id
&
thread_id
()
const
{
return
tid_
;
return
tid_
;
}
}
inline
void
thread_id
(
std
::
thread
::
id
tid
)
{
void
thread_id
(
std
::
thread
::
id
tid
)
{
tid_
=
std
::
move
(
tid
);
tid_
=
std
::
move
(
tid
);
}
}
...
...
libcaf_io/caf/io/network/receive_buffer.hpp
View file @
4e4c8732
...
@@ -64,28 +64,28 @@ public:
...
@@ -64,28 +64,28 @@ public:
receive_buffer
&
operator
=
(
const
receive_buffer
&
other
);
receive_buffer
&
operator
=
(
const
receive_buffer
&
other
);
/// Returns a pointer to the underlying buffer.
/// Returns a pointer to the underlying buffer.
inline
pointer
data
()
noexcept
{
pointer
data
()
noexcept
{
return
buffer_
.
get
();
return
buffer_
.
get
();
}
}
/// Returns a const pointer to the data.
/// Returns a const pointer to the data.
inline
const_pointer
data
()
const
noexcept
{
const_pointer
data
()
const
noexcept
{
return
buffer_
.
get
();
return
buffer_
.
get
();
}
}
/// Returns the number of stored elements.
/// Returns the number of stored elements.
inline
size_type
size
()
const
noexcept
{
size_type
size
()
const
noexcept
{
return
size_
;
return
size_
;
}
}
/// Returns the number of elements that the container has allocated space for.
/// Returns the number of elements that the container has allocated space for.
inline
size_type
capacity
()
const
noexcept
{
size_type
capacity
()
const
noexcept
{
return
capacity_
;
return
capacity_
;
}
}
/// Returns the maximum possible number of elements the container
/// Returns the maximum possible number of elements the container
/// could theoretically hold.
/// could theoretically hold.
inline
size_type
max_size
()
const
noexcept
{
size_type
max_size
()
const
noexcept
{
return
std
::
numeric_limits
<
size_t
>::
max
();
return
std
::
numeric_limits
<
size_t
>::
max
();
}
}
...
@@ -102,7 +102,7 @@ public:
...
@@ -102,7 +102,7 @@ public:
void
shrink_to_fit
();
void
shrink_to_fit
();
/// Check if the container is empty.
/// Check if the container is empty.
inline
bool
empty
()
const
noexcept
{
bool
empty
()
const
noexcept
{
return
size_
==
0
;
return
size_
==
0
;
}
}
...
@@ -113,62 +113,62 @@ public:
...
@@ -113,62 +113,62 @@ public:
void
swap
(
receive_buffer
&
other
)
noexcept
;
void
swap
(
receive_buffer
&
other
)
noexcept
;
/// Returns an iterator to the beginning.
/// Returns an iterator to the beginning.
i
nline
i
terator
begin
()
noexcept
{
iterator
begin
()
noexcept
{
return
buffer_
.
get
();
return
buffer_
.
get
();
}
}
/// Returns an iterator to the end.
/// Returns an iterator to the end.
i
nline
i
terator
end
()
noexcept
{
iterator
end
()
noexcept
{
return
buffer_
.
get
()
+
size_
;
return
buffer_
.
get
()
+
size_
;
}
}
/// Returns an iterator to the beginning.
/// Returns an iterator to the beginning.
inline
const_iterator
begin
()
const
noexcept
{
const_iterator
begin
()
const
noexcept
{
return
buffer_
.
get
();
return
buffer_
.
get
();
}
}
/// Returns an iterator to the end.
/// Returns an iterator to the end.
inline
const_iterator
end
()
const
noexcept
{
const_iterator
end
()
const
noexcept
{
return
buffer_
.
get
()
+
size_
;
return
buffer_
.
get
()
+
size_
;
}
}
/// Returns an iterator to the beginning.
/// Returns an iterator to the beginning.
inline
const_iterator
cbegin
()
const
noexcept
{
const_iterator
cbegin
()
const
noexcept
{
return
buffer_
.
get
();
return
buffer_
.
get
();
}
}
/// Returns an iterator to the end.
/// Returns an iterator to the end.
inline
const_iterator
cend
()
const
noexcept
{
const_iterator
cend
()
const
noexcept
{
return
buffer_
.
get
()
+
size_
;
return
buffer_
.
get
()
+
size_
;
}
}
/// Returns jan iterator to the reverse beginning.
/// Returns jan iterator to the reverse beginning.
inline
reverse_iterator
rbegin
()
noexcept
{
reverse_iterator
rbegin
()
noexcept
{
return
reverse_iterator
{
buffer_
.
get
()
+
size_
};
return
reverse_iterator
{
buffer_
.
get
()
+
size_
};
}
}
/// Returns an iterator to the reverse end of the data.
/// Returns an iterator to the reverse end of the data.
inline
reverse_iterator
rend
()
noexcept
{
reverse_iterator
rend
()
noexcept
{
return
reverse_iterator
{
buffer_
.
get
()};
return
reverse_iterator
{
buffer_
.
get
()};
}
}
/// Returns an iterator to the reverse beginning.
/// Returns an iterator to the reverse beginning.
inline
const_reverse_iterator
rbegin
()
const
noexcept
{
const_reverse_iterator
rbegin
()
const
noexcept
{
return
const_reverse_iterator
{
buffer_
.
get
()
+
size_
};
return
const_reverse_iterator
{
buffer_
.
get
()
+
size_
};
}
}
/// Returns an iterator to the reverse end of the data.
/// Returns an iterator to the reverse end of the data.
inline
const_reverse_iterator
rend
()
const
noexcept
{
const_reverse_iterator
rend
()
const
noexcept
{
return
const_reverse_iterator
{
buffer_
.
get
()};
return
const_reverse_iterator
{
buffer_
.
get
()};
}
}
/// Returns an iterator to the reverse beginning.
/// Returns an iterator to the reverse beginning.
inline
const_reverse_iterator
crbegin
()
const
noexcept
{
const_reverse_iterator
crbegin
()
const
noexcept
{
return
const_reverse_iterator
{
buffer_
.
get
()
+
size_
};
return
const_reverse_iterator
{
buffer_
.
get
()
+
size_
};
}
}
/// Returns an iterator to the reverse end of the data.
/// Returns an iterator to the reverse end of the data.
inline
const_reverse_iterator
crend
()
const
noexcept
{
const_reverse_iterator
crend
()
const
noexcept
{
return
const_reverse_iterator
{
buffer_
.
get
()};
return
const_reverse_iterator
{
buffer_
.
get
()};
}
}
...
...
libcaf_io/caf/io/network/stream.hpp
View file @
4e4c8732
...
@@ -59,14 +59,14 @@ public:
...
@@ -59,14 +59,14 @@ public:
/// Returns the write buffer of this stream.
/// Returns the write buffer of this stream.
/// @warning Must not be modified outside the IO multiplexers event loop
/// @warning Must not be modified outside the IO multiplexers event loop
/// once the stream has been started.
/// once the stream has been started.
inline
byte_buffer
&
wr_buf
()
{
byte_buffer
&
wr_buf
()
{
return
wr_offline_buf_
;
return
wr_offline_buf_
;
}
}
/// Returns the read buffer of this stream.
/// Returns the read buffer of this stream.
/// @warning Must not be modified outside the IO multiplexers event loop
/// @warning Must not be modified outside the IO multiplexers event loop
/// once the stream has been started.
/// once the stream has been started.
inline
byte_buffer
&
rd_buf
()
{
byte_buffer
&
rd_buf
()
{
return
rd_buf_
;
return
rd_buf_
;
}
}
...
...
libcaf_io/caf/io/network/test_multiplexer.hpp
View file @
4e4c8732
...
@@ -262,22 +262,22 @@ public:
...
@@ -262,22 +262,22 @@ public:
void
flush_runnables
();
void
flush_runnables
();
/// Executes the next `num` enqueued runnables immediately.
/// Executes the next `num` enqueued runnables immediately.
inline
void
inline_next_runnables
(
size_t
num
)
{
void
inline_next_runnables
(
size_t
num
)
{
inline_runnables_
+=
num
;
inline_runnables_
+=
num
;
}
}
/// Executes the next enqueued runnable immediately.
/// Executes the next enqueued runnable immediately.
inline
void
inline_next_runnable
()
{
void
inline_next_runnable
()
{
inline_next_runnables
(
1
);
inline_next_runnables
(
1
);
}
}
/// Resets the counter for the next inlined runnables.
/// Resets the counter for the next inlined runnables.
inline
void
reset_inlining
()
{
void
reset_inlining
()
{
inline_runnables_
=
0
;
inline_runnables_
=
0
;
}
}
/// Installs a callback that is triggered on the next inlined runnable.
/// Installs a callback that is triggered on the next inlined runnable.
inline
void
after_next_inlined_runnable
(
std
::
function
<
void
()
>
f
)
{
void
after_next_inlined_runnable
(
std
::
function
<
void
()
>
f
)
{
inline_runnable_callback_
=
std
::
move
(
f
);
inline_runnable_callback_
=
std
::
move
(
f
);
}
}
...
...
libcaf_openssl/caf/openssl/manager.hpp
View file @
4e4c8732
...
@@ -44,17 +44,17 @@ public:
...
@@ -44,17 +44,17 @@ public:
void
*
subtype_ptr
()
override
;
void
*
subtype_ptr
()
override
;
/// Returns an SSL-aware implementation of the middleman actor interface.
/// Returns an SSL-aware implementation of the middleman actor interface.
inline
const
io
::
middleman_actor
&
actor_handle
()
const
{
const
io
::
middleman_actor
&
actor_handle
()
const
{
return
manager_
;
return
manager_
;
}
}
/// Returns the enclosing actor system.
/// Returns the enclosing actor system.
inline
actor_system
&
system
()
{
actor_system
&
system
()
{
return
system_
;
return
system_
;
}
}
/// Returns the system-wide configuration.
/// Returns the system-wide configuration.
inline
const
actor_system_config
&
config
()
const
{
const
actor_system_config
&
config
()
const
{
return
system_
.
config
();
return
system_
.
config
();
}
}
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
4e4c8732
...
@@ -241,15 +241,15 @@ public:
...
@@ -241,15 +241,15 @@ public:
const
std
::
string
&
name
()
const
;
const
std
::
string
&
name
()
const
;
inline
size_t
good
()
{
size_t
good
()
{
return
good_
;
return
good_
;
}
}
inline
size_t
bad
()
{
size_t
bad
()
{
return
bad_
;
return
bad_
;
}
}
inline
bool
disabled
()
const
noexcept
{
bool
disabled
()
const
noexcept
{
return
disabled_
;
return
disabled_
;
}
}
...
@@ -325,7 +325,7 @@ public:
...
@@ -325,7 +325,7 @@ public:
file_
<<
y
;
file_
<<
y
;
}
}
inline
void
log
(
level
lvl
,
const
std
::
nullptr_t
&
)
{
void
log
(
level
lvl
,
const
std
::
nullptr_t
&
)
{
log
(
lvl
,
"null"
);
log
(
lvl
,
"null"
);
}
}
...
...
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