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

std::popcount not found when compiling with msvc 2019 x64

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.0.0
    • None
    • Qt 6.0.0

      MSVC x64 19.28.29335
    • Windows

    Description

      Hi,

      When building with /std:c++latest on msvc 2019, compiler complain

      `error C2039: 'popcount': is not a member of 'std'` in qalgorithms.h file

       

      when adding #include <bit> on top of the header, the issue is fixed and the projet compile and run fine, so the problem is the detection of __cplusplus, it seems that msvc don't set the value of __cpluscplus (and set it to 199711) which cause the non inclusion of <bit> header

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            arthapz arthur laurent
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes