Jim Porter
unread,Feb 20, 2015, 4:11:38 AM2/20/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to std-dis...@isocpp.org
Are std::regex_constants::syntax_option_type and
std::regex_constants::match_flag_type guaranteed to be distinct types?
Since [bitmask.types] says they can be defined as integer types, I'm
guessing there's no such guarantee, but [re.const] could be read to say
otherwise: "This namespace provides three types, syntax_option_type,
match_flag_type, and error_type...".
If the standard doesn't currently guarantee that these types are
distinct, should it? It would help to prevent any errors from using the
incorrect set of constants in the regex functions.
(For more details, I ask because I'd like to perform a regex match from
using a string for the expression, like so:
my_regex_match("foo", syntax, match_flag);
where either syntax or match_flag can be omitted.)
- Jim