-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
LWG issue neededA wording defect that should be submitted to LWG as a new issueA wording defect that should be submitted to LWG as a new issueenhancementSomething can be improvedSomething can be improvedregexmeow is a substring of homeownermeow is a substring of homeowner
Description
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:
Lines 1650 to 1652 in 6aa3b02
_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.
Metadata
Metadata
Assignees
Labels
LWG issue neededA wording defect that should be submitted to LWG as a new issueA wording defect that should be submitted to LWG as a new issueenhancementSomething can be improvedSomething can be improvedregexmeow is a substring of homeownermeow is a substring of homeowner