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
f259fbb6
Commit
f259fbb6
authored
Jan 08, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings on GCC
parent
52f65ece
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
+11
-18
libcaf_core/caf/config_value.hpp
libcaf_core/caf/config_value.hpp
+1
-1
libcaf_core/caf/string_view.hpp
libcaf_core/caf/string_view.hpp
+9
-16
libcaf_io/src/io/middleman.cpp
libcaf_io/src/io/middleman.cpp
+1
-1
No files found.
libcaf_core/caf/config_value.hpp
View file @
f259fbb6
...
...
@@ -64,7 +64,7 @@ CAF_ADD_CONFIG_VALUE_TYPE(dictionary<config_value>);
template
<
class
T
>
constexpr
bool
is_config_value_type_v
=
is_config_value_type
<
T
>::
value
;
}
;
// namespace caf::detail
}
// namespace caf::detail
namespace
caf
{
...
...
libcaf_core/caf/string_view.hpp
View file @
f259fbb6
...
...
@@ -27,16 +27,15 @@ struct is_string_like {
template
<
class
U
>
static
bool
sfinae
(
const
U
*
x
,
// check if `
(*x)[0]` returns `const char&`
typename
std
::
enable_if
<
std
::
is_same
<
const
char
&
,
decltype
((
*
x
)[
0
])
>::
value
>::
type
*
=
nullptr
,
// check if `
x->data()` returns const char*
std
::
enable_if_t
<
std
::
is_same
<
const
char
*
,
decltype
(
x
->
data
())
>::
value
>
*
=
nullptr
,
// check if `x->size()` returns an integer
typename
std
::
enable_if
<
std
::
is_integral
<
decltype
(
x
->
size
())
>::
value
>::
type
*
=
nullptr
,
std
::
enable_if_t
<
std
::
is_integral
<
decltype
(
x
->
size
())
>::
value
>*
=
nullptr
,
// check if `x->find('?', 0)` is well-formed and returns an integer
// (distinguishes vectors from strings)
typename
std
::
enable_if
<
std
::
is_integral
<
decltype
(
x
->
find
(
'?'
,
0
))
>::
value
>
::
type
*
=
nullptr
);
std
::
enable_if_t
<
std
::
is_integral
<
decltype
(
x
->
find
(
'?'
,
0
))
>::
value
>*
=
nullptr
);
// SFINAE fallback.
static
void
sfinae
(
void
*
);
...
...
@@ -105,15 +104,9 @@ public:
template
<
class
T
,
class
=
typename
std
::
enable_if
<
detail
::
is_string_like
<
T
>
::
value
>::
type
>
string_view
(
const
T
&
str
)
noexcept
{
auto
len
=
str
.
size
();
if
(
len
==
0
)
{
data_
=
nullptr
;
size_
=
0
;
}
else
{
data_
=
&
(
str
[
0
]);
size_
=
str
.
size
();
}
constexpr
string_view
(
const
T
&
str
)
noexcept
:
data_
(
str
.
data
()),
size_
(
str
.
size
())
{
// nop
}
string_view
&
operator
=
(
const
string_view
&
)
noexcept
=
default
;
...
...
libcaf_io/src/io/middleman.cpp
View file @
f259fbb6
...
...
@@ -391,7 +391,7 @@ strong_actor_ptr middleman::remote_lookup(std::string name,
make_message
(
registry_lookup_atom_v
,
std
::
move
(
name
)));
self
->
receive
(
[
&
](
strong_actor_ptr
&
addr
)
{
result
=
std
::
move
(
addr
);
},
others
>>
[](
message
&
msg
)
->
skippable_result
{
others
>>
[](
[[
maybe_unused
]]
message
&
msg
)
->
skippable_result
{
CAF_LOG_ERROR
(
"middleman received unexpected remote_lookup result:"
<<
msg
);
return
message
{};
...
...
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