Bug ID: 77987
           Summary: unique_ptr<T[]> reset rejects cv-compatible pointers
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

#include <memory>

int main() {
    std::unique_ptr<const char[]> p;
    p.reset(new char[1]);

fails to compile with due to reset invoking swap on two different types.
However, this code should be well-formed per N4089.

Reply via email to