1348. Exception safety of unspecified types

Section: 16 [library] Status: NAD Submitter: BSI Opened: 2010-08-25 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View other active issues in [library].

View all other issues in [library].

View all issues with NAD status.


Addresses GB-64

There are a number of unspecified types used throughout the library, such as the container iterators. Many of these unspecified types have restrictions or expectations on their behaviour in terms of exceptions. Are they permitted or required to use exception specifications, more specifically the new noexcept specification? For example, if vector<T>::iterator is implemented as a native pointer, all its operations will have an (effective) noexcept specification. If the implementation uses a class type to implement this iterator, is it permitted or required to support that same guarantee?

[ Resolution proposed by ballot comment ]

Clearly state the requirements for exception specifications on all unspecified library types. For example, all container iterator operations should be conditionally noexcept, with the condition matching the same operation applied to the allocator's pointer_type, a certain subset of which are already required not to throw.

[2011-03-24 Madrid meeting]


Alisdair: Probably an NAD Future at least but could be NAD.

Daniel K: Approach is not consistent with what we've decided with noexcept.

Alisdair: Any objection to marking 1348 as NAD?

No objections.


Standard is correct as written

Proposed resolution: