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

### 86. String constructors don't describe exceptions

Section: 23.4.3.2 [string.require] Status: TC1 Submitter: Nico Josuttis Opened: 1998-09-29 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [string.require].

View all issues with TC1 status.

Discussion:

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).

Proposed resolution:

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

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.