Skip to content
Snippets Groups Projects
Verified Commit e7d4860d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Do not use C++20 input range adaptors

Not supported by LLVM/libc++ < 16.
parent 35611af8
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,8 @@ Environment::print(ostream& output, const vector<string>& vars, int line, bool s ...@@ -118,7 +118,8 @@ Environment::print(ostream& output, const vector<string>& vars, int line, bool s
if (vars.empty()) if (vars.empty())
{ {
vector<string> variables_sorted; vector<string> variables_sorted;
ranges::copy(views::keys(variables), back_inserter(variables_sorted)); ranges::transform(variables, back_inserter(variables_sorted),
&decltype(variables)::value_type::first);
ranges::sort(variables_sorted, case_insensitive_string_less); ranges::sort(variables_sorted, case_insensitive_string_less);
for (const auto& it : variables_sorted) for (const auto& it : variables_sorted)
printVariable(output, it, line, save); printVariable(output, it, line, save);
...@@ -134,7 +135,8 @@ Environment::print(ostream& output, const vector<string>& vars, int line, bool s ...@@ -134,7 +135,8 @@ Environment::print(ostream& output, const vector<string>& vars, int line, bool s
if (vars.empty()) if (vars.empty())
{ {
vector<string> functions_sorted; vector<string> functions_sorted;
ranges::copy(views::keys(functions), back_inserter(functions_sorted)); ranges::transform(functions, back_inserter(functions_sorted),
&decltype(functions)::value_type::first);
ranges::sort(functions_sorted, case_insensitive_string_less); ranges::sort(functions_sorted, case_insensitive_string_less);
for (const auto& it : functions_sorted) for (const auto& it : functions_sorted)
printFunction(output, it, line, save); printFunction(output, it, line, save);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment