Warm tip: This article is reproduced from serverfault.com, please click

How to enable C++17 compiling in Visual Studio?

发布于 2016-12-23 23:32:37

I want to use C++17 features.

How can I switch compiling from C++14 to C++17 in Microsoft Visual Studio?

Or it's not avaiable in release versions of VS?

Questioner
Tudvari
Viewed
0
Johan Lundberg 2019-12-27 05:44:40

There's now a drop down (at least since VS 2017.3.5) where you can specifically select C++17. The available options are (under project > Properties > C/C++ > Language > C++ Language Standard)

  • ISO C++14 Standard. msvc command line option: /std:c++14
  • ISO C++17 Standard. msvc command line option: /std:c++17
  • The latest draft standard. msvc command line option: /std:c++latest

(I bet, once C++20 is out and more fully supported by Visual Studio it will be /std:c++20)