Bug ID: 77990
           Summary: unique_ptr<T, D>::unique_ptr(T*) imposes
                    CopyConstructible on the deleter
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot
          Reporter: evansr at google dot com
                CC: brooks at gcc dot
  Target Milestone: ---

Created attachment 39815
test case

C++11 spec [unique.ptr.single.ctor] says:

For unique_ptr<T, D> the ctor overload:

  explicit unique_ptr(pointer p);

Requires: D shall satisfy DefaultConstructible.

The current libstdc++ implementation imposes CopyConstructible because it
constructs the _M_t data member tuple as _M_t(__p, deleter_type()).


Reply via email to