From 3691e283165f331382a9d344545007ac6fe37a53 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 26 Jul 2020 11:56:25 +0300 Subject: [PATCH] build: attempt to avoid some libc++ problems Seems there are problems compiling mu with XCode 11.6 (see build tests); apparently because of libc++ being different from libstdc++. clang++ builds works fine as long as we're using libstdc++. --- lib/utils/mu-command-parser.cc | 4 ++-- lib/utils/mu-sexp.hh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/utils/mu-command-parser.cc b/lib/utils/mu-command-parser.cc index 86c64d09..eb422d10 100644 --- a/lib/utils/mu-command-parser.cc +++ b/lib/utils/mu-command-parser.cc @@ -53,7 +53,7 @@ Command::invoke(const Command::CommandMap& cmap, const Sexp& call) // calls used keyword-parameters, e.g. // (my-function :bar 1 :cuux "fnorb") // so, we're looking for the odd-numbered parameters. - const auto param_it = [&]() { + const auto param_it = [&]()->Sexp::Seq::const_iterator { for (size_t i = 1; i < params.size(); i += 2) if (params.at(i).is_symbol() && params.at(i).value() == argname) return params.begin() + i + 1; @@ -94,7 +94,7 @@ Command::invoke(const Command::CommandMap& cmap, const Sexp& call) cinfo.handler(params); } -static auto +static Sexp::Seq::const_iterator find_param_node (const Parameters& params, const std::string& argname) { if (params.empty()) diff --git a/lib/utils/mu-sexp.hh b/lib/utils/mu-sexp.hh index c90ee6f6..847eea70 100644 --- a/lib/utils/mu-sexp.hh +++ b/lib/utils/mu-sexp.hh @@ -306,7 +306,8 @@ private: static bool is_prop_list (Seq::const_iterator b, Seq::const_iterator e) { while (b != e) { - if (!is_prop_name(*b)) + const Sexp& s{*b}; + if (!is_prop_name(s)) return false; if (++b == e) return false;