-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Pull request 208 Suppress conversion warnings in match_results broke the ability to pass an unscoped enum to match_results operator[] (and related functions).
This ability was particularly useful because it allowed giving expressive names to matches without having to number them individually (which is error prone).
E.g.:
enum { banana = 1, apple, orange };
boost::regex r("(banana)|(apple)|(orange)");
allowing
match[apple]
with the index value updating automatically when changing the regex (so long as the enum is updated to match).
Two possible fixes:
- Quick: Add an explicit test for enums
- Correct: Allow anything which converts implicitly to int, restoring earlier behaviour
Metadata
Metadata
Assignees
Labels
No labels