This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

628. Inconsistent definition of basic_regex constructor

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

Priority: Not Prioritized

View all other issues in [re.regex].

View all issues with CD1 status.

Discussion:

Section 32.7 [re.regex] lists a constructor

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

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

Proposed resolution:

Change 32.7.2 [re.regex.construct]:

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