https://bugs.llvm.org/show_bug.cgi?id=32147
Bug ID: 32147
Summary: shared_ptr's converting ctor from unique_ptr is
incorrectly constrained.
Product: libc++
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: e...@efcs.ca
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
Libc++ incorrectly rejects the following code.
Reproducer from stack overflow:
// clang++ -std=c++14 test.cpp
#include <memory>
int main() {
auto up = std::unique_ptr<int[]>(new int[5]{});
auto sp = std::shared_ptr<int>(std::move(up));
}
I'm not yet 100% sure this is the behavior required be the C++17 standard, but
It needs to be investigated and libc++ is most likely wrong.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs