mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
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:
parent
6ad6fd165b
commit
3b3f6bbe4d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue