Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-25371

QVector += QVector destroys pre-allocation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.8.0, 5.0.0
    • None

    Description

      QVector<int> a, b; 
      a.reserve(1000); 
      b.append(1); 
      a += b;
      

      results in calling QVector::realloc(0, 1); essentially destroying the pre-allocation

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              biochimia João Abecasis
              hjk hjk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes