[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c++/80579] New: std::vector<T>::reserve should not require T to be moveable.
From:       "carlo at gcc dot gnu.org" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2017-04-30 21:13:10
Message-ID: bug-80579-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic