VS2005,VS2008遵循哪个标准? [英] Which standard does VS2005, VS2008 follow?
问题描述
它们都遵循2003年发布的C ++ 03吗?
Do they both follow the C++03 released in 2003?
推荐答案
它们都针对C ++ 03,是的.但是他们俩都有无法遵守该标准的地方.(顺便说一句,海湾合作委员会也是如此,在任何一方的迷们开始在嘴里起泡沫之前.)
They both target C++03, yes. But they also both have areas where they fail to comply with the standard. (So does GCC, btw, before any fanboys on either side starts frothing at the mouth).
但是请记住,C ++ 03本质上是一个很小的错误修正版本,它确定了明智的编译器本来应该做的一些常识"事情(例如,在C ++ 98中,严格来说C ++ 03禁止这样做,但是每个明智的编译器供应商总会使用连续向量 ,因为这就是向量的意图
But keep in mind that C++03 is basically a very small bugfix release, nailing down a few "common sense" things that sensible compilers would have done anyway (for example, in C++98, it was, strictly speaking, possible to have vectors that aren't contiguously allocated. C++03 prohibits that, but every sane compiler vendor would have used contiguous vectors anyway, because that's what vectors are intended for)
GCC甚至没有C ++ 03标准设置.您告诉它以C ++ 98为目标(使用 std = c ++ 98)
,而实际上它以C ++ 03为目标.我不知道实际上可以区分这两者的编译器,因为更改很少而且很明显.
GCC doesn't even have a C++03 standard setting. You tell it to target C++98 (with std=c++98)
, and it actually targets C++03 instead. I'm not aware of a compiler which actually makes a distinction between the two, because the changes are so few, and so obvious.
这篇关于VS2005,VS2008遵循哪个标准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!