Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which standard does VS2005, VS2008 follow?

Do they both follow the C++03 released in 2003?

like image 651
user754221 Avatar asked Jun 02 '11 07:06

user754221


2 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.

like image 64
jalf Avatar answered Oct 19 '22 22:10

jalf


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.

like image 26
Alok Save Avatar answered Oct 19 '22 23:10

Alok Save