This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80579] New: std::vector<T>::reserve should not require T to be moveable.


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]