Title
String constructors don't describe exceptions
Status
tc1
Section
[string.require]
Submitter
Nico Josuttis

Created on 1998-09-29.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Throws clauses for length_error if n == npos are no longer needed because they are subsumed by the general wording added by the resolution for issue 83.

Date: 2010-10-21.18:28:33

Proposed resolution:

In [string.require], Strike throws paragraphs for constructors which say "Throws: length_error if n == npos."

Date: 1998-09-29.00:00:00

The constructor from a range:

template<class InputIterator> 
         basic_string(InputIterator begin, InputIterator end, 
                      const Allocator& a = Allocator());

lacks a throws clause. However, I would expect that it throws according to the other constructors if the numbers of characters in the range equals npos (or exceeds max_size(), see above).

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg198
2010-10-21 18:28:33adminsetmessages: + msg197
1998-09-29 00:00:00admincreate