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

QSet deprecation warning for range loops

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.0 Beta1
    • None
    • Visual Studio 2019 16.4.5, Windows 10
    • Windows

    Description

      When using range loops with a QSet a warning pops up complaining about deprecated operator --.

      Example:

      QSet<int> test;
      for(const auto &t : test) {
      }

      C:\Qt\5.15.0\msvc2017_64\include\QtCore/qset.h(177): warning C4996: 'QHash<T,QHashDummyValue>::const_iterator::operator --': was declared deprecated

      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\xutility(1591): note: see reference to function template instantiation 'QSet<T>::const_iterator &QSet<T>::const_iterator::operator --(void)'

       

       

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              zerocom Stefan Sommerfeld
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes