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. Can not use c++latest with 5.15.2 and MSVC
Forum Updated to NodeBB v4.3 + New Features

Can not use c++latest with 5.15.2 and MSVC

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.1k Views
  • 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
    St.Stanislav
    wrote on last edited by St.Stanislav
    #1

    Hello all!

    I have the aforementioned issue with the following setup:
    OS: Windows 10 Home, 20H2, build 19042.928
    Compiler: Microsoft Visual C++ Compiler 16.8.30717.126
    QT: Qt 5.15.2 MSVC2019 64bit

    My project *.pro file has the following line:

    CONFIG += c++2a
    

    (I have also tried c++latest)

    I want to use designated initializers, e.g.

    SomeStruct {.someField = someValue};
    

    But I have the following error:

    error: C7555: use of designated initializers requires at least '/std:c++latest'
    

    What's the problem in my case? Thank you in advance!

    KroMignonK 1 Reply Last reply
    0
    • S St.Stanislav

      Hello all!

      I have the aforementioned issue with the following setup:
      OS: Windows 10 Home, 20H2, build 19042.928
      Compiler: Microsoft Visual C++ Compiler 16.8.30717.126
      QT: Qt 5.15.2 MSVC2019 64bit

      My project *.pro file has the following line:

      CONFIG += c++2a
      

      (I have also tried c++latest)

      I want to use designated initializers, e.g.

      SomeStruct {.someField = someValue};
      

      But I have the following error:

      error: C7555: use of designated initializers requires at least '/std:c++latest'
      

      What's the problem in my case? Thank you in advance!

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @St-Stanislav You could try QMAKE_CXXFLAGS += /std:c++latest

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      S 1 Reply Last reply
      2
      • KroMignonK KroMignon

        @St-Stanislav You could try QMAKE_CXXFLAGS += /std:c++latest

        S Offline
        S Offline
        St.Stanislav
        wrote on last edited by
        #3

        @KroMignon Thank you! It made everything well. Looks like that Windows or VS update broke this, because it worked well two days ago only with c++2a flag.

        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