Fix build against macOS deployment target 10.10

- std::optional<T>::value() is not available, use operator * instead
- alignment allocation is also only available in 10.14 or newer
This commit is contained in:
Simon Hausmann 2023-04-24 17:29:41 +02:00 committed by Simon Hausmann
parent 18253b5150
commit 0ba6ef1c24
4 changed files with 14 additions and 4 deletions

View file

@ -36,7 +36,7 @@ std::string WidgetLocation::location_bindings() const
{
auto maybe_binding = [](std::string_view name, const auto &opt_value) -> std::string {
if (opt_value.has_value()) {
return fmt::format(" {}: {};\n", name, opt_value.value());
return fmt::format(" {}: {};\n", name, *opt_value);
} else {
return "";
}