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
4d6fce68
Commit
4d6fce68
authored
Oct 13, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing holds_alternative overload
parent
175c021f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
libcaf_core/caf/actor_system_config.hpp
libcaf_core/caf/actor_system_config.hpp
+11
-4
No files found.
libcaf_core/caf/actor_system_config.hpp
View file @
4d6fce68
...
@@ -415,14 +415,14 @@ private:
...
@@ -415,14 +415,14 @@ private:
const
settings
&
content
(
const
actor_system_config
&
cfg
);
const
settings
&
content
(
const
actor_system_config
&
cfg
);
/// Tries to retrieve the value associated to `name` from `cfg`.
/// Tries to retrieve the value associated to `name` from `cfg`.
/// @relates
config_value
/// @relates
actor_system_config
template
<
class
T
>
template
<
class
T
>
optional
<
T
>
get_if
(
const
actor_system_config
*
cfg
,
string_view
name
)
{
optional
<
T
>
get_if
(
const
actor_system_config
*
cfg
,
string_view
name
)
{
return
get_if
<
T
>
(
&
content
(
*
cfg
),
name
);
return
get_if
<
T
>
(
&
content
(
*
cfg
),
name
);
}
}
/// Retrieves the value associated to `name` from `cfg`.
/// Retrieves the value associated to `name` from `cfg`.
/// @relates
config_value
/// @relates
actor_system_config
template
<
class
T
>
template
<
class
T
>
T
get
(
const
actor_system_config
&
cfg
,
string_view
name
)
{
T
get
(
const
actor_system_config
&
cfg
,
string_view
name
)
{
return
get
<
T
>
(
content
(
cfg
),
name
);
return
get
<
T
>
(
content
(
cfg
),
name
);
...
@@ -430,7 +430,7 @@ T get(const actor_system_config& cfg, string_view name) {
...
@@ -430,7 +430,7 @@ T get(const actor_system_config& cfg, string_view name) {
/// Retrieves the value associated to `name` from `cfg` or returns
/// Retrieves the value associated to `name` from `cfg` or returns
/// `default_value`.
/// `default_value`.
/// @relates
config_value
/// @relates
actor_system_config
template
<
class
T
,
class
=
typename
std
::
enable_if
<
template
<
class
T
,
class
=
typename
std
::
enable_if
<
!
std
::
is_pointer
<
T
>
::
value
!
std
::
is_pointer
<
T
>
::
value
&&
!
std
::
is_convertible
<
T
,
string_view
>::
value
>::
type
>
&&
!
std
::
is_convertible
<
T
,
string_view
>::
value
>::
type
>
...
@@ -440,10 +440,17 @@ T get_or(const actor_system_config& cfg, string_view name, T default_value) {
...
@@ -440,10 +440,17 @@ T get_or(const actor_system_config& cfg, string_view name, T default_value) {
/// Retrieves the value associated to `name` from `cfg` or returns
/// Retrieves the value associated to `name` from `cfg` or returns
/// `default_value`.
/// `default_value`.
/// @relates
config_value
/// @relates
actor_system_config
inline
std
::
string
get_or
(
const
actor_system_config
&
cfg
,
string_view
name
,
inline
std
::
string
get_or
(
const
actor_system_config
&
cfg
,
string_view
name
,
string_view
default_value
)
{
string_view
default_value
)
{
return
get_or
(
content
(
cfg
),
name
,
default_value
);
return
get_or
(
content
(
cfg
),
name
,
default_value
);
}
}
/// Returns whether `xs` associates a value of type `T` to `name`.
/// @relates actor_system_config
template
<
class
T
>
bool
holds_alternative
(
const
actor_system_config
&
cfg
,
string_view
name
)
{
return
holds_alternative
<
T
>
(
content
(
cfg
),
name
);
}
}
// namespace caf
}
// namespace caf
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