Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to disable c++ warning for c++17
Forum Updated to NodeBB v4.3 + New Features

How to disable c++ warning for c++17

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
6 Posts 3 Posters 2.0k 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.
  • B Offline
    B Offline
    billconan
    wrote on last edited by
    #1

    The new QtCreator has a nicer c++ error check with libclang.

    But my code is in c++17, and the checker seems to be unfriendly to c++17 syntax.

    Some legit syntax is treated as errors. Others are shown as unwanted warning messages, for example "constexpr is not supported before c++17"

    How do I config the checker to recognize c++17?

    aha_1980A 1 Reply Last reply
    0
    • B billconan

      The new QtCreator has a nicer c++ error check with libclang.

      But my code is in c++17, and the checker seems to be unfriendly to c++17 syntax.

      Some legit syntax is treated as errors. Others are shown as unwanted warning messages, for example "constexpr is not supported before c++17"

      How do I config the checker to recognize c++17?

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

      @billconan have you added CONFIG+=c++1z in pro file?

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        billconan
        wrote on last edited by
        #3

        yes, I always add it. but it's useless in terms of controlling qtcreator.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          What version of Qt Creator are you using ?
          On what platform ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            What version of Qt Creator are you using ?
            On what platform ?

            B Offline
            B Offline
            billconan
            wrote on last edited by
            #5

            @SGaist ubtuntu 17.10 and the latest QtCreator, 4.7.2

            aha_1980A 1 Reply Last reply
            0
            • B billconan

              @SGaist ubtuntu 17.10 and the latest QtCreator, 4.7.2

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

              @billconan do you have a minimal example for us to counter check?

              Also, Creator 4.8 is just around the corner, there are already beta snapshots to try.

              Qt has to stay free or it will die.

              1 Reply Last reply
              0

              • Login

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