Reported by https://stackoverflow.com/questions/58399158/use-custom-allocator-for-stdregex-match .
Calling regex_match() or regex_search() with a match_results containing a custom allocator ends up constructing ordinary vector containers in _Matcher, specifically:
|
_Tgt_state_t<_It> _Tgt_state;
|
|
_Tgt_state_t<_It> _Res;
|
|
vector<_Loop_vals_t> _Loop_vals;
|
The Standard is silent on this topic, but libc++ uses the match_results allocator here.
It may be possible to fix this while preserving ABI, by renaming _Matcher (which is a large but internal helper class).
Note: <regex> mostly ignores the existence of allocators; see LWG-1396 "regex should support allocators" and LWG-2216 "regex_replace(basic_string) allocator handling" for examples.
Reported by https://stackoverflow.com/questions/58399158/use-custom-allocator-for-stdregex-match .
Calling
regex_match()orregex_search()with amatch_resultscontaining a custom allocator ends up constructing ordinaryvectorcontainers in_Matcher, specifically:STL/stl/inc/regex
Lines 1650 to 1652 in 6aa3b02
The Standard is silent on this topic, but libc++ uses the
match_resultsallocator here.It may be possible to fix this while preserving ABI, by renaming
_Matcher(which is a large but internal helper class).Note:
<regex>mostly ignores the existence of allocators; see LWG-1396 "regexshould support allocators" and LWG-2216 "regex_replace(basic_string)allocator handling" for examples.