Linked by Thom Holwerda on Thu 30th Oct 2008 12:53 UTC, submitted by CPPfanboy
General Development The proposed new standard for the C++ programming language, C++0x, has reached feature completeness. "This is 'it', feature-complete C++0x, including the major feature of 'concepts' which had its own extensive set of papers for language and library extensions (if you get the impression that concepts is a big feature, well, it is indeed easily the biggest addition we made in C++0x)."
Permalink for comment 335793
To read all comments associated with this story, please click here.
Comment by pcunite
by pcunite on Fri 31st Oct 2008 09:32 UTC
Member since:

Good news for C++ development. Finally some useful standardized cross platform types.

The only downside I see is that the new standard will be almost 100% compatible with the standard C++98. Thus you don't need to update your code to compile so alotta crap code and styles can still be written if developers are not educated and use the new easier features.

On the plus side it makes for an easer break when one does occur. Compiler vendors can just say "C++0x" compatible only...

Some cool things that stand out to me:

for (vector<int>::const_iterator itr = myvec.begin(); itr != myvec.end(); ++itr)
Can now be expressed as:
for (auto itr = myvec.begin(); itr != myvec.end(); ++itr)

Much better compiler errors especially for the standard template libraries.

Concepts sounds like a better expression of Templates.

nullptr explicit null pointer keyword

FULL cross platform support for strings! UTF-8, UTF-16, and UTF-32.
char has now been modified to be both at least the size necessary to store an eight-bit coding of UTF-8 and large enough to contain any member of the compiler's basic execution character set. It was previously defined as only the latter. char16_t, char32_t deliver support for the other encodings. Thus for string literals we have:
u8"I'm a UTF-8 string."
u"This is a UTF-16 string."
U"This is a UTF-32 string."
Thankfully you can also insert Unicode codepoints into strings in case you don't want to type in the character themselves or as in the case of RTF text keep the text file UTF-8.
u8"This is a Unicode Character: \u2018."
u"This is a bigger Unicode Character: \u2018."
U"This is a Unicode Character: \u2018."

Multi-Threading! I am unsure what they have done here but it seems there may be a std::thread class now.

unsigned long long and signed long long can now be expressed as uint64, int64_t

Hash table types:
unordered_set, unordered_multiset, unordered_map, unordered_multimap
with insert(), erase(), begin(), and end() functions.

Regular expressions class basic_regex now available!

General-purpose smart pointers:
shared_ptr, weak_ptr, unique_ptr replaces auto_ptr

Reply Score: 5