We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libc++ incorrectly rejects the following code.
Reproducer from stack overflow:
// clang++ -std=c++14 test.cpp #include
int main() { auto up = std::unique_ptr<int[]>(new int[5]{}); auto sp = std::shared_ptr(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.
The text was updated successfully, but these errors were encountered:
So both C++11 and C++14 seem to allow this, but it appears to be forbidden in C++17 after applying p0414r2.
Sorry, something went wrong.
Fixed by https://reviews.llvm.org/D80882.
No branches or pull requests
Extended Description
Libc++ incorrectly rejects the following code.
Reproducer from stack overflow:
// clang++ -std=c++14 test.cpp
#include
int main() {
auto up = std::unique_ptr<int[]>(new int[5]{});
auto sp = std::shared_ptr(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.
The text was updated successfully, but these errors were encountered: