2053. Errors in regex bitmask types

Section: 31.5 [re.const] Status: C++14 Submitter: Jonathan Wakely Opened: 2011-05-09 Last modified: 2016-02-10

Priority: Not Prioritized

View all issues with C++14 status.

Discussion:

When N3110 was applied to the WP some redundant "static" keywords were added and one form of initializer which isn't valid for enumeration types was replaced with another form of invalid initializer.

[ 2011 Bloomington. ]

Move to Ready.

Proposed resolution:

This wording is relative to the FDIS.

  1. Change 31.5.1 [re.synopt] as indicated:

    namespace std {
      namespace regex_constants {
        typedef T1 syntax_option_type;
        static constexpr syntax_option_type icase = unspecified ;
        static constexpr syntax_option_type nosubs = unspecified ;
        static constexpr syntax_option_type optimize = unspecified ;
        static constexpr syntax_option_type collate = unspecified ;
        static constexpr syntax_option_type ECMAScript = unspecified ;
        static constexpr syntax_option_type basic = unspecified ;
        static constexpr syntax_option_type extended = unspecified ;
        static constexpr syntax_option_type awk = unspecified ;
        static constexpr syntax_option_type grep = unspecified ;
        static constexpr syntax_option_type egrep = unspecified ;
      }
    }
    
  2. Change 31.5.2 [re.matchflag] as indicated:

    namespace std {
      namespace regex_constants {
        typedef T2 match_flag_type;
        static constexpr match_flag_type match_default = 0{};
        static constexpr match_flag_type match_not_bol = unspecified ;
        static constexpr match_flag_type match_not_eol = unspecified ;
        static constexpr match_flag_type match_not_bow = unspecified ;
        static constexpr match_flag_type match_not_eow = unspecified ;
        static constexpr match_flag_type match_any = unspecified ;
        static constexpr match_flag_type match_not_null = unspecified ;
        static constexpr match_flag_type match_continuous = unspecified ;
        static constexpr match_flag_type match_prev_avail = unspecified ;
        static constexpr match_flag_type format_default = 0{};
        static constexpr match_flag_type format_sed = unspecified ;
        static constexpr match_flag_type format_no_copy = unspecified ;
        static constexpr match_flag_type format_first_only = unspecified ;
      }
    }
    
  3. Change 31.5.3 [re.err] as indicated:

    namespace std {
      namespace regex_constants {
        typedef T3 error_type;
        static constexpr error_type error_collate = unspecified ;
        static constexpr error_type error_ctype = unspecified ;
        static constexpr error_type error_escape = unspecified ;
        static constexpr error_type error_backref = unspecified ;
        static constexpr error_type error_brack = unspecified ;
        static constexpr error_type error_paren = unspecified ;
        static constexpr error_type error_brace = unspecified ;
        static constexpr error_type error_badbrace = unspecified ;
        static constexpr error_type error_range = unspecified ;
        static constexpr error_type error_space = unspecified ;
        static constexpr error_type error_badrepeat = unspecified ;
        static constexpr error_type error_complexity = unspecified ;
        static constexpr error_type error_stack = unspecified ;
      }
    }