Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C++14 works even if not added to CONFIG
Qt 6.12 LTS is out! See what's new in the release blog

C++14 works even if not added to CONFIG

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 621 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.
  • michalt38M Offline
    michalt38M Offline
    michalt38
    wrote on last edited by michalt38
    #1

    In pro file I have:

    CONFIG += c++11
    

    But I can use C++14 features like:

    int i = 0b0001'0000'0001;
    

    How is that possible? I'm using Qt Createtor 4.12.1 and MSVC 2017 64 bit.
    Even I if remove CONFIG line, it still works.

    JonBJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Maybe the /std:c++14 is included in the mkspec or in effect from other source.
      Like at some point you had to add
      CONFIG += c++11
      for mingw but now its not needed.

      1 Reply Last reply
      1
      • michalt38M michalt38

        In pro file I have:

        CONFIG += c++11
        

        But I can use C++14 features like:

        int i = 0b0001'0000'0001;
        

        How is that possible? I'm using Qt Createtor 4.12.1 and MSVC 2017 64 bit.
        Even I if remove CONFIG line, it still works.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @michalt38 said in C++14 works even if not added to CONFIG:
        I was about to say what @jsulm has just said, and/or I guess MSVC 2017 just automatically supports this?

        What exact command line is being generated when MSVC compiler is called? According to https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2017 you might need to pass /std:..., and that doesn't even seem to accept /std:c++11?

        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
        • Unsolved