VS 2010 中“”标头缺少模板
我刚刚注意到 c++ 标准版本中缺少 c++11 标准 [26.8 c.math] 为
标头规定的模板Visual Studio 2010 附带的库。
特别是我正在寻找 std::signbit 但 在 msdn 上的搜索证实了我在附带的标头中看到的内容(即一系列仅导入“旧”C 名称的 using 指令)。 我不记得读过有关这种与标准的偏差的内容,msdn 文档中也没有明确指出。
获得缺失功能的最佳解决方法是什么?
是否有一些关于在 Visual Studio 的未来版本中修复此问题的官方沟通?
编辑 我所指的标准版本已经过时,因此我声称不完整的说法是没有针对性的。 signbit 仍然缺失,但它不是模板,它是一个重载函数。感谢@Xeo 的澄清。
I just noticed that the templates dictated by the c++11 Standard [26.8 c.math] for the <cmath>
header are missing from the version of the c++ standard library shipped with visual studio 2010.
In particular I was looking for std::signbit but a search on msdn confirmed what I was seeing in the shipped header (namely, a series of using directives which import only the "old" C names).
I didn't recall reading about this deviation from the Standard, nor is it explicitly pointed out in the msdn documentation.
What is the best workaround to get the missing functionality?
Is there some official communication about fixing this in some future release of Visual Studio?
EDIT
The version of the Standard which I was referring to is outdated, so my claim of incompleteness is ill-aimed. signbit is still missing, but it's not a template, it's an overloaded function. Thanks to @Xeo for the clarification.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,这些不是模板(这会很奇怪,因为有C 中没有模板,并且
是 C 标头)。然后,VS2010 在 C++11 完成之前就已发布,因此可以理解的是,其中并未包含所有 stdlib。
FWIW,VS11 声称覆盖了整个 C++11 stdlib。
First, these aren't templates (would be strange, as there are no templates in C and
<cmath>
is a C header).Then, VS2010 was shipped way before C++11 was finished, so it's understandable that not all of the stdlib is included there.
FWIW, VS11 claims to have the whole C++11 stdlib covered.