否<可选>在MS Visual Studio 2013中-怎么办? [英] No <optional> in MS Visual Studio 2013 - what to do?
问题描述
我想使用std::experimental::optional
,但是MSVS 2013告诉我找不到标头.
I want to use std::experimental::optional
, but MSVS 2013 tells me it can't find the header.
- 为什么不在那里?
- 我可以根据其他地方的代码推出自己的产品吗?可能是C ++ 14提案?
推荐答案
std::experimental::optional
源自 Boost.Optional 库,并且此实现在Visual C ++ 12.0中效果很好(尽管与 N3793 提案文件,可以在此处找到.
std::experimental::optional
originates from the Boost.Optional library, and this implementation works well in Visual C++ 12.0 (though it differs a little). Reference single-header implementation, based on the N3793 proposal paper, can be found here.
Visual Studio附带的受支持的C ++ 11/14/1z核心和库功能的最新列表可从 Visual C ++ Team Blog ,来自这里.
The latest list of supported C++11/14/1z core and library features that are shipped with Visual Studio can be found from the Visual C++ Team blog, from this post in particular. A set of header files of the Standard Library implementation (and some extensions) from Microsoft can be viewed here.
这篇关于否<可选>在MS Visual Studio 2013中-怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!