Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to use C++17 with MSVC2017 toolsets

Unable to use C++17 with MSVC2017 toolsets

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 802 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SSU-DirectX
    wrote on last edited by
    #1

    Unable to use C++17 with MSVC2017 toolset.
    I've already written "CONFIG += c++17".
    However, macros like __HAS_CXX17 are not defined (we couldn't define it manually as it's kept), so we couldn't access C++17 features.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      CONFIG += c++17 is not yet a qmake flag. I think it will be in Qt 5.12.

      You can pass MSVC flags (if it has any to enable C++17) via QMAKE_CXXFLAGS. Docs

      (Z(:^

      aha_1980A 1 Reply Last reply
      1
      • sierdzioS sierdzio

        CONFIG += c++17 is not yet a qmake flag. I think it will be in Qt 5.12.

        You can pass MSVC flags (if it has any to enable C++17) via QMAKE_CXXFLAGS. Docs

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @sierdzio said in Unable to use C++17 with MSVC2017 toolsets:

        CONFIG += c++17 is not yet a qmake flag. I think it will be in Qt 5.12.

        Correct. For now you have to pass CONFIG+=C++1z

        You can pass MSVC flags (if it has any to enable C++17) via QMAKE_CXXFLAGS. Docs

        I'm not sure that is still needed with the correct config option.

        Qt has to stay free or it will die.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved