Commit ddbdc9c3 authored by Dominik Charousset's avatar Dominik Charousset

Fix overload resolution for get_or

parent 4cd321b1
...@@ -361,18 +361,12 @@ T get(const actor_system_config& cfg, string_view name) { ...@@ -361,18 +361,12 @@ 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 config_value
template <class T, class E = detail::enable_if_t<!std::is_pointer<T>::value>> template <class K, class V>
T get_or(const actor_system_config& cfg, string_view name, auto get_or(const actor_system_config& cfg, K&& name, V&& default_value)
const T& default_value) { -> decltype(get_or(content(cfg), std::forward<K>(name),
return get_or(content(cfg), name, default_value); std::forward<V>(default_value))) {
} return get_or(content(cfg), std::forward<K>(name),
std::forward<V>(default_value));
/// Retrieves the value associated to `name` from `cfg` or returns
/// `default_value`.
/// @relates config_value
inline std::string get_or(const actor_system_config& cfg, string_view name,
string_view default_value) {
return get_or(content(cfg), name, default_value);
} }
} // namespace caf } // namespace caf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment