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
fdf82e06
Commit
fdf82e06
authored
Jun 08, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
parent
01cef548
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
+0
-82
libcaf_core/caf/config_value.hpp
libcaf_core/caf/config_value.hpp
+0
-82
No files found.
libcaf_core/caf/config_value.hpp
View file @
fdf82e06
...
...
@@ -427,88 +427,6 @@ T get_or(const config_value::dictionary& xs, std::string path,
return
get_or
(
xs
,
{
path
},
default_value
);
}
/*
template <class T>
struct config_value_access<std::vector<T>> {
using vector_type = std::vector<T>;
static bool is(const config_value& x) {
auto lst = caf::get_if<config_value::list>(&x);
if (lst != nullptr) {
return std::all_of(lst->begin(), lst->end(), [](const config_value& x) {
return caf::holds_alternative<T>(x);
});
}
return false;
}
static optional<vector_type> get_if(const config_value* x) {
vector_type result;
auto extract = [&](const config_value& y) {
auto opt = caf::get_if<T>(&y);
if (opt) {
result.emplace_back(*opt);
return true;
}
return false;
};
auto lst = caf::get_if<config_value::list>(x);
if (lst != nullptr && std::all_of(lst->begin(), lst->end(), extract))
return result;
return none;
}
static vector_type get(const config_value& x) {
auto result = get_if(x);
if (!result)
CAF_RAISE_ERROR("invalid type found");
return std::move(*result);
}
};
template <class V>
struct config_value_access<std::map<std::string, V>> {
using map_type = std::map<std::string, V>;
using kvp = std::pair<const std::string, config_value>;
static bool is(const config_value& x) {
auto lst = caf::get_if<config_value::dictionary>(&x);
if (lst != nullptr) {
return std::all_of(lst->begin(), lst->end(), [](const kvp& x) {
return config_value_access<V>::is(x.second);
});
}
return false;
}
static optional<map_type> get_if(const config_value* x) {
map_type result;
auto extract = [&](const kvp& y) {
auto opt = caf::get_if<V>(y.second);
if (opt) {
result.emplace_back(y.first, *opt);
return true;
}
return false;
};
auto lst = caf::get_if<config_value::dictionary>(x);
if (lst != nullptr && std::all_of(lst->begin(), lst->end(), extract))
return result;
return none;
}
static map_type get(const config_value& x) {
auto result = get_if(x);
if (!result)
CAF_RAISE_ERROR("invalid type found");
return std::move(*result);
}
};
*/
/// @relates config_value
bool
operator
<
(
const
config_value
&
x
,
const
config_value
&
y
);
...
...
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