Do they both follow the C++03 released in 2003?
3 Answers
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.

- 243,077
- 51
- 345
- 550
-
Actually they first wanted to have C++03 as a TC, but in the end because of some formality it ended up as a new standard release IIRC. – Johannes Schaub - litb Jun 02 '11 at 08:20
-
[Here is a list of MSVC2008 nonstandard features](http://msdn.microsoft.com/en-us/library/x84h5b78%28v=vs.90%29.aspx). I didn't find a similar for GCC, can you provide one? (not "fanboying" I'm just honestly curious about it) – Tamás Szelei Jun 02 '11 at 08:29
-
@Tamás I don't have one at hand, no, but if you search through SO, you'll find there are a few questions about odd corner cases that GCC doesn't handle correctly. My gut feeling is that GCC is "closer" to compliance than VC++ is, but my point was merely that neither compiler is 100% there. :) – jalf Jun 02 '11 at 20:08
-
Yes, I agree with that point. Especially considering that GCC enables the GNU extensions by default. Still, I'd be happy to see a list of corner-cases for GCC's C++03 support. If anyone comes by and know one, please don't hesitate to link it here. – Tamás Szelei Jun 02 '11 at 20:25
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.
-
That's a little misleading. The final draft is already finished which means there will be no changes in this standard. What's left until the actual standardization is politics. – Tamás Szelei Jun 02 '11 at 08:08
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.

- 23,169
- 18
- 105
- 180
-
this is a table with the C++0x features available in VisualStudio 9 and 10 http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx – Marius Bancila Jun 02 '11 at 08:06
-
2@Gunner: nope. The committee has made the final draft, which is about to be voted on by the ISO member countries. Later this year, the votes should be in, ISO will take a month or two to tie a ribbon around it and wrap everything up, and then it will be published officially. – jalf Jun 02 '11 at 08:13
-
As @jalf says. The workflow of the committee ensures that the final vote is only a formality. – Tamás Szelei Jun 02 '11 at 08:18