Commit 1dece448 authored by Dominik Charousset's avatar Dominik Charousset

Remove overlooked use of caf::optional

parent 5d4ba835
...@@ -49,14 +49,15 @@ struct fixture { ...@@ -49,14 +49,15 @@ struct fixture {
} }
template <class T> template <class T>
optional<T> get(const settings& cfg, std::string_view key) { std::optional<T> get(const settings& cfg, std::string_view key) {
if (auto ptr = get_if<T>(&cfg, key)) if (auto ptr = get_if<T>(&cfg, key))
return *ptr; return *ptr;
return none; else
return {};
} }
template <class T> template <class T>
optional<T> get(std::string_view key) { std::optional<T> get(std::string_view key) {
if (auto* xs = get_if<settings>(&x)) if (auto* xs = get_if<settings>(&x))
return get<T>(*xs, key); return get<T>(*xs, key);
else else
......
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