gen-zam: Fix a bug caused by different behaviour of std::regex_replace under MSVC.

Under MSVC regex objects are multiline by default and there is no apparant way of changing this behaviour. Under clang/gcc regex is singleline unless std::regeX_constants::multiline is specificied.
This behaviour is assumed in Gen-ZAM.cc when auto-generating header files.

Example: https://godbolt.org/z/aP59x3EhT
This commit is contained in:
Tomer Lev 2022-09-18 12:34:05 +03:00 committed by Tim Wojtulewicz
parent 6ad6fd165b
commit 3b3f6bbe4d

View file

@ -1381,7 +1381,7 @@ void ZAM_ExprOpTemplate::InstantiateEval(const vector<ZAM_OperandType>& ot_orig,
auto replacement = VecEvalRE(has_target);
eval = regex_replace(eval, regex(rhs), replacement);
eval = regex_replace(eval, regex(rhs), replacement, std::regex_constants::match_not_null);
}
auto is_none = ei.LHS_ET() == ZAM_EXPR_TYPE_NONE;