Title
basic_regex ctor takes InputIterator or ForwardIterator?
Status
cd1
Section
[re.regex.construct]
Submitter
Eric Niebler

Created on 2007-06-03.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Adopt the proposed resolution in N2409.

Date: 2010-10-21.18:28:33

[ John adds: ]

I think either could be implemented? Although an input iterator would probably require an internal copy of the string being made.

I have no strong feelings either way, although I think my original intent was InputIterator.

Date: 2007-06-03.00:00:00

Looking at N2284, [re.regex], p3 basic_regex class template synopsis shows this constructor:

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

In [re.regex.construct], p15, the constructor appears with this signature:

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

ForwardIterator is probably correct, so the synopsis is wrong.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3428
2010-10-21 18:28:33adminsetmessages: + msg3427
2007-06-03 00:00:00admincreate