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. Use of C++2a in Qt 5.13
Forum Updated to NodeBB v4.3 + New Features

Use of C++2a in Qt 5.13

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 3.9k Views 2 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.
  • ankit thakarA Offline
    ankit thakarA Offline
    ankit thakar
    wrote on last edited by
    #1

    Hello Team,

    Can I use C++20 draft features like range v3, format text etc. in Qt's latest version i.e. Qt 5.13? if yes then how?

    K 1 Reply Last reply
    0
    • ankit thakarA ankit thakar

      Hello Team,

      Can I use C++20 draft features like range v3, format text etc. in Qt's latest version i.e. Qt 5.13? if yes then how?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @ankit-thakar

      C++ standard features are compiler dependend. You would need to check with the compiler documentation, if it does already support this standard. As a next step if the compiler is already part of prebuilds, you may use with

      CONFIG += <standard>
      

      If it is not öpart of prebuilds you need to compile Qt libs on your own.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      6
      • ankit thakarA Offline
        ankit thakarA Offline
        ankit thakar
        wrote on last edited by
        #3

        Oh I see,
        I have checked for Qt 5.13 for mingw supported gcc version is 7.3.0 which supports c++17 for c++20, supported gcc version is >=8.0.

        So, I guess as you said I need to build qt libs by my own or need to wait proper Qt version in which gcc 8 will be integrated.

        W jsulmJ 2 Replies Last reply
        1
        • ankit thakarA ankit thakar

          Oh I see,
          I have checked for Qt 5.13 for mingw supported gcc version is 7.3.0 which supports c++17 for c++20, supported gcc version is >=8.0.

          So, I guess as you said I need to build qt libs by my own or need to wait proper Qt version in which gcc 8 will be integrated.

          W Offline
          W Offline
          wrosecrans
          wrote on last edited by
          #4

          @ankit-thakar

          No need to wait for Qt to do any special integration work. gcc 8 and gcc 9 should build the current Qt just fine. It is usually a good idea to rebuild all libraries you are using (including Qt) when you switch to a new compiler, so that everything is consistent. It might work with the old binaries, but Qt Creator will likely give you a warning when you have a mismatch between the compiler version and the compiler that was used to build Qt.

          1 Reply Last reply
          1
          • ankit thakarA ankit thakar

            Oh I see,
            I have checked for Qt 5.13 for mingw supported gcc version is 7.3.0 which supports c++17 for c++20, supported gcc version is >=8.0.

            So, I guess as you said I need to build qt libs by my own or need to wait proper Qt version in which gcc 8 will be integrated.

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @ankit-thakar If you just want to use these new C++ features in your own code then you don't have to wait for Qt to adapt or build Qt by yourself. Just activate the C++ standard you want to use like @koahnig wrote.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2

            • Login

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