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

MSVC 17.8 warns as error on stdext::checked_array_iterator

    XMLWordPrintable

Details

    • Windows

    Description

      If compare two QStringList objects with "==" operator, Visual Studio 2022 17.8 complains about the deprecation of stdext::make_checked_array_iterator

      The extended warning message is:

      warning C4996: 'stdext::checked_array_iterator<const T *>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.

      This tiny code can reproduce it

      
      QStringList list;
      QStringList two;
      if(list==two)
      {
      qDebug()<<"Hello";
      } 

      Attachments

        Issue Links

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

          Activity

            People

              manordheim MÃ¥rten Nordheim
              irfan.omair@digia.com Irfan Omair
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes