Visual Studio 2017 does not supportC11 new feature _Generic

前端 未结 2 2061
南方客
南方客 2021-01-19 10:10

Can anybody advise why Visual Studio 2017 does not support the C11 new feature _Generic? I found it is a very useful feature but cannot used in Visual Studio 20

2条回答
  •  死守一世寂寞
    2021-01-19 10:36

    Visual Studio 2017 does not support any C11 features. You can plug Intel C compiler into Visual Studio (which supports C11) or use Clang or Gcc.

    Quora answer:

    • To your Visual Studio add the inbuilt CLANG support
    • Create new project
    • In project properties (General) for “Platform Toolset” select “Visual Studio 2017 - Clang with Microsoft CodeGen (v141_clang_c2)
    • In C/C++ “Language” section open the “C language” standard list , where you will find all the C standards relevant todayL C89, C99, C11 …select the one you wish

    After this (same as ever) VS2017 will compile files with “.c” extension as C, and “.cpp” extension as C++.

    Do not forget that one can change the properties on the per file basis too.

提交回复
热议问题