Issue |
136298
|
Summary |
Copying of std::vector filled with neither copy constructible nor copy assignable elements
|
Labels |
new issue
|
Assignees |
|
Reporter |
Fedr
|
This program
```c++
#include <concepts>
#include <vector>
struct A {
A() {}
A(const A&) = delete;
A(auto &&) {}
A & operator=(const A&) = delete;
};
static_assert(!std::copy_constructible<A>);
const std::vector<A> v(3);
// auto w{ v }; // fails both in libstdc++ and in libc++
auto w( v ); // ok in libc++
```
is rejected with `libstdc++`, but accepted with `libc++`, which looks incorrect.
Online demo: https://gcc.godbolt.org/z/v1MdbzMT1
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs