Do they both follow the C++03 released in 2003?
问题:
回答1:
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).
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 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.
回答2:
Yes, VS2005
& VS2008
both follow C++03
. They do support some features of C++0x
though but they are not fully C++0x
compliant, most probably none of the compilers is at the moment since the final specification is to be published yet. GCC
povides compliance to C++0x
than any other compiler at the moment.
C++0x is not yet released.The final specification is expected to be published sometime in mid-2011.
You should see this.
回答3:
Yes, both of them follow C++03. VS2010 has some C++0x features. The most complete feature support is offered by GCC at the moment.