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
75c6cf50
Unverified
Commit
75c6cf50
authored
Aug 04, 2021
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comments, reenable config_consumer test
parent
04f71904
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
17 deletions
+14
-17
libcaf_core/caf/config_option.hpp
libcaf_core/caf/config_option.hpp
+2
-2
libcaf_core/caf/config_value.hpp
libcaf_core/caf/config_value.hpp
+1
-1
libcaf_core/caf/default_enum_inspect.hpp
libcaf_core/caf/default_enum_inspect.hpp
+1
-1
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+1
-1
libcaf_core/caf/string_view.hpp
libcaf_core/caf/string_view.hpp
+0
-2
libcaf_core/caf/telemetry/label.hpp
libcaf_core/caf/telemetry/label.hpp
+1
-1
libcaf_core/caf/telemetry/metric_registry.hpp
libcaf_core/caf/telemetry/metric_registry.hpp
+2
-4
libcaf_core/src/string_view.cpp
libcaf_core/src/string_view.cpp
+1
-1
libcaf_core/test/detail/config_consumer.cpp
libcaf_core/test/detail/config_consumer.cpp
+3
-2
libcaf_core/test/string_view.cpp
libcaf_core/test/string_view.cpp
+2
-2
No files found.
libcaf_core/caf/config_option.hpp
View file @
75c6cf50
...
...
@@ -115,8 +115,8 @@ private:
/// Finds `config_option` string with a matching long name in (`first`, `last`],
/// where each entry is a pointer to a string. Returns a `ForwardIterator` to
/// the match and a `
caf::std::
string_view` of the option value if the entry is
/// found and a `ForwardIterator` to `last` with an empty `st
d::st
ring_view`
/// the match and a `string_view` of the option value if the entry is
/// found and a `ForwardIterator` to `last` with an empty `string_view`
/// otherwise.
template
<
class
ForwardIterator
,
class
Sentinel
>
std
::
pair
<
ForwardIterator
,
std
::
string_view
>
...
...
libcaf_core/caf/config_value.hpp
View file @
75c6cf50
...
...
@@ -500,7 +500,7 @@ expected<T> get_as(const config_value& value) {
/// Customization point for configuring automatic mappings from default value
/// types to deduced types. For example, `get_or(value, "foo"sv)` must return a
/// `string` rather than a `st
d::st
ring_view`. However, user-defined overloads
/// `string` rather than a `string_view`. However, user-defined overloads
/// *must not* specialize this class for any type from the namespaces `std` or
/// `caf`.
template
<
class
T
>
...
...
libcaf_core/caf/default_enum_inspect.hpp
View file @
75c6cf50
...
...
@@ -19,7 +19,7 @@ namespace caf {
/// ~~~(cpp)
/// enum class Enumeration : ... { ... };
/// std::string to_string(Enumeration);
/// bool from_string(st
d::st
ring_view, Enumeration&);
/// bool from_string(string_view, Enumeration&);
/// bool from_integer(std::underlying_type_t<Enumeration>, Enumeration&);
/// ~~~
template
<
class
Inspector
,
class
Enumeration
>
...
...
libcaf_core/caf/fwd.hpp
View file @
75c6cf50
...
...
@@ -131,7 +131,7 @@ class scoped_actor;
class
serializer
;
class
skip_t
;
class
stream_manager
;
class
string_view
;
class
[[
deprecated
(
"Use `std::string_view instead`"
)]]
string_view
;
class
tracing_data
;
class
tracing_data_factory
;
class
type_id_list
;
...
...
libcaf_core/caf/string_view.hpp
View file @
75c6cf50
...
...
@@ -51,8 +51,6 @@ struct is_string_like {
}
// namespace detail
class
[[
deprecated
(
"Use `std::string_view instead`"
)]]
string_view
;
/// Drop-in replacement for C++17 std::string_view.
class
CAF_CORE_EXPORT
string_view
:
detail
::
comparable
<
string_view
>
{
public:
...
...
libcaf_core/caf/telemetry/label.hpp
View file @
75c6cf50
...
...
@@ -58,7 +58,7 @@ public:
private:
size_t
name_length_
;
std
::
string
str_
;
};
// namespace caf::telemetry
};
/// Returns the @ref label in `name=value` notation.
/// @relates label
...
...
libcaf_core/caf/telemetry/metric_registry.hpp
View file @
75c6cf50
...
...
@@ -499,8 +499,7 @@ public:
config_
=
ptr
;
}
// -- observers
// --------------------------------------------------------------
// -- observers --------------------------------------------------------------
template
<
class
Collector
>
void
collect
(
Collector
&
collector
)
const
{
...
...
@@ -510,8 +509,7 @@ public:
visit_family
(
f
,
ptr
.
get
());
}
// -- modifiers
// --------------------------------------------------------------
// -- modifiers --------------------------------------------------------------
/// Takes ownership of all metric families in `other`.
/// @pre `other` *must not* contain any duplicated metric family
...
...
libcaf_core/src/string_view.cpp
View file @
75c6cf50
libcaf_core/test/detail/config_consumer.cpp
View file @
75c6cf50
...
...
@@ -67,8 +67,9 @@ CAF_TEST(config_consumer) {
string_parser_state
res
{
str
.
begin
(),
str
.
end
()};
detail
::
parser
::
read_config
(
res
,
consumer
);
CAF_CHECK_EQUAL
(
res
.
code
,
pec
::
success
);
// TODO: empty constructor not present in std::string_view
// CAF_CHECK_EQUAL(std::string_view(res.i, res.e), std::string_view());
CAF_CHECK_EQUAL
(
std
::
string_view
(
std
::
addressof
(
*
res
.
i
),
static_cast
<
size_t
>
(
res
.
e
-
res
.
i
)),
std
::
string_view
());
CAF_CHECK_EQUAL
(
get_as
<
bool
>
(
config
,
"is_server"
),
true
);
CAF_CHECK_EQUAL
(
get_as
<
uint16_t
>
(
config
,
"port"
),
4242u
);
CAF_CHECK_EQUAL
(
get_as
<
ls
>
(
config
,
"nodes"
),
ls
({
"sun"
,
"venus"
}));
...
...
libcaf_core/test/string_view.cpp
View file @
75c6cf50
...
...
@@ -4,10 +4,10 @@
#define CAF_SUITE string_view
#include "caf/string_view.hpp"
#include "core-test.hpp"
#include "caf/string_view.hpp"
using
namespace
caf
;
using
namespace
caf
::
literals
;
...
...
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