This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80579] New: std::vector<T>::reserve should not require T to be moveable.
- From: "carlo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Apr 2017 21:13:10 +0000
- Subject: [Bug c++/80579] New: std::vector<T>::reserve should not require T to be moveable.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80579
Bug ID: 80579
Summary: std::vector<T>::reserve should not require T to be
moveable.
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: carlo at gcc dot gnu.org
Target Milestone: ---
g++ 7.0.1 fails on
#include <vector>
struct B { B(B&&) = delete; };
std::vector<B> v;
int main() { v.reserve(8); }
error: use of deleted function 'B::B(B&&)'
while clang 5.0.0 compiles it.