Skip to content
Snippets Groups Projects
Commit c6733559 authored by MichelJuillard's avatar MichelJuillard
Browse files

more fix for local bindings error

parent 2821bee7
No related branches found
No related tags found
No related merge requests found
......@@ -186,11 +186,21 @@ OptionsList::writeOutputCommon(ostream& output, const string& option_group) cons
{
// NOLINTBEGIN(clang-analyzer-core.CallAndMessage)
for (const auto &[name, val] : options)
std::visit(
[&]<class T>(const T& v) {
auto name1 = name;
std::visit([&]<class T>(const T &v)
{
if constexpr(is_same_v<T, SymbolListVal>)
v.writeOutput(option_group + "." + name, output);
v.writeOutput(option_group + "." + name1, output);
else
{
output << option_group << "." << name1 << " = ";
if constexpr(is_same_v<T, NumVal> || is_same_v<T, DateVal>)
output << v;
else if constexpr(is_same_v<T, pair<string, string>>)
output << '[' << v.first << "; " << v.second << ']';
else if constexpr(is_same_v<T, StringVal>)
output << "'" << v << "'";
else if constexpr(is_same_v<T, vector<int>>)
{
output << option_group << "." << name << " = ";
if constexpr (is_same_v<T, NumVal> || is_same_v<T, DateVal>)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment