Skip to content
Snippets Groups Projects
Commit 05851d58 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

fix build for macOS 10.13

This patch fix compile error: 'value' is unavailable: introduced
in macOS 10.14 when building for macOS 10.13

Change-Id: I1825c138d102531460759869426904a7da464a58
parent 3443dc66
No related branches found
No related tags found
No related merge requests found
......@@ -265,7 +265,16 @@ private:
}
// Hard unbox and unwrap underlying data container.
const BaseType& data() { return data_.value().get(); }
const BaseType& data() {
//this fix error when build for macOS 10.13(error: 'value' is unavailable: introduced in macOS 10.14)
#ifdef __APPLE__
if(!data_.has_value())
throw std::logic_error("bad optional access");
return *data_;
#else
return data_.value().get();
#endif
}
// Actually filter the view.
template<typename T, typename Func = FilterCallback>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment