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

2060. unique_ptr<T[]>(nullptr_t) missing noexcept

Section: [unique.ptr.runtime] Status: NAD Editorial Submitter: Howard Hinnant, Paolo Carlini Opened: 2011-05-27 Last modified: 2017-02-03

Priority: Not Prioritized

View all other issues in [unique.ptr.runtime].

View all issues with NAD Editorial status.


The synopsis in [unique.ptr.single] specifies:

constexpr unique_ptr(nullptr_t) noexcept

which looks correct to me. However the corresponding constructor in [unique.ptr.runtime] is missing noexcept:

constexpr unique_ptr(nullptr_t) : unique_ptr() { }

[Bloomington, 2011]

Closed as NAD Editorial.

Proposed resolution:

This wording is relative to the FDIS.

  1. Modify the synopsis in [unique.ptr.runtime]:

    namespace std {
      template <class T, class D> class unique_ptr<T[], D> {
        typedef see below pointer;
        typedef T element_type;
        typedef D deleter_type;
        //, constructors
        constexpr unique_ptr() noexcept;
        constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }