如何在Visual Studio中启用C ++ 17编译? [英] How to enable C++17 compiling in Visual Studio?
本文介绍了如何在Visual Studio中启用C ++ 17编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用C ++ 17功能.
I want to use C++17 features.
如何在Microsoft Visual Studio中将编译从C ++ 14切换到C ++ 17?
How can I switch compiling from C++14 to C++17 in Microsoft Visual Studio?
还是在VS发行版中不可用?
Or it's not avaiable in release versions of VS?
推荐答案
现在有一个下拉列表(至少自VS 2017.3.5起),您可以在其中专门选择C ++ 17.可用选项为(在项目>属性> C/C ++>语言> C ++语言标准下)
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标准. msvc命令行选项:
/std:c++14
- ISO C ++ 17标准. msvc命令行选项:
/std:c++17
- 最新标准草案. msvc命令行选项:
/std:c++latest
- 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
(我敢打赌,一旦C ++ 20退出市场并且Visual Studio更全面地支持它,它将是/std:c++20
)
(I bet, once C++20 is out and more fully supported by Visual Studio it will be /std:c++20
)
这篇关于如何在Visual Studio中启用C ++ 17编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文