628. Inconsistent definition of basic_regex constructor

Section: 31.8 [re.regex] Status: CD1 Submitter: Bo Persson Opened: 2007-01-23 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [re.regex].

View all issues with CD1 status.

Discussion:

Section 31.8 [re.regex] lists a constructor

template<class InputIterator>
basic_regex(InputIterator first, InputIterator last,
                       flag_type f = regex_constants::ECMAScript);

However, in section 31.8.2 [re.regex.construct], this constructor takes a pair of ForwardIterator.

Proposed resolution:

Change 31.8.2 [re.regex.construct]:

template <class ForwardIterator InputIterator>
  basic_regex(ForwardIterator InputIterator first, ForwardIterator InputIterator last, 
              flag_type f = regex_constants::ECMAScript);