tags:

views:

399

answers:

6

What is a good place to learn about the new C++ 0x features? I understand that they may not have been fully finalized yet but it would be nice to get a head start. Also, what compilers currently support them?

A: 

Not a duplicate but you could get some answers here There are both links to drafts and a list of compilers that are implementing C++[0|1]x features

Schildmeijer
A: 

You should certainly know about the official working group web site for ISO/IEC JTC1/SC22/WG21. This has the committee information, so it contains the official documents that are under development. However, it is not necessarily the best place to learn about the background ideas behind the various suggested ideas for C++0x.

Another place to look is the comp.std.c++ news group; this often has esoteric discussions of the minutiae of possible features.

Jonathan Leffler
+8  A: 

An easy and fun way to learn about it is to watch the C++0x Overview Google Techtalk. Another good source is Bjarne Stroutstrup's C++0x FAQ which covers a huge portion of the new features.

Michael Aaron Safyan
A: 

This is not really about the language features but you might want to take a look at TR1. It's a specification of libraries that will most likley make it into C++0x.

There are actual implementations for it so you can play with it right now (for example a VC++ implementation by Microsoft).

Maximilian
+2  A: 

For VC++2010, here's the list of things that will be there.

Language (some of these were in VC2008 already as language extensions):

  • lambdas
  • static_assert
  • auto and decltype
  • rvalue references (T&&)
  • nullptr
  • extern template (note: not export!)
  • long long
  • no space required between closing > in nested templates (e.g. vector<vector<int>> is legal)

Libraries:

  • <stdint.h> / <cstdint> and all the typedefs within (at last!)
  • std::unique_ptr, std::shared_ptr and std::weak_ptr
  • std::forward_list
  • std::tuple and associated things (e.g. tie, get...)
  • <system_error>
  • <type_index>

What is NOT there:

  • initializer lists (curiously enough, header <initializer_list> is there and contains the respective type, but there seems to be no language support for it in beta 2)
  • variadic templates
  • constexpr
  • range-based for (though language extension for each, which is mostly similar, remains)
  • uniform initialization syntax {}
  • alternative function syntax (that mimicks lambdas)
  • constructor delegation
  • same-line member field initializers
  • [[override]] (but override remains as a language extension)
  • =default and =delete on members
  • enum class
  • using for type aliases, and template using
  • char16_t and char32_t, and the corresponding string literals
  • raw and user-defined string literals
  • sizeof on instance fields without object instance
  • std::thread and friends
Pavel Minaev
A link to the source would be great!
csl
http://msdn.microsoft.com/en-us/library/dd465215(VS.100).aspx covers language features. There's also a series of blog posts, though they're somewhat outdated now (e.g. they claim no `nullptr` support, even though it is now there): http://blogs.msdn.com/vcblog/archive/2008/10/28/lambdas-auto-and-static-assert-c-0x-features-in-vc10-part-1.aspx http://blogs.msdn.com/vcblog/archive/2009/02/03/rvalue-references-c-0x-features-in-vc10-part-2.aspx http://blogs.msdn.com/vcblog/archive/2009/04/22/decltype-c-0x-features-in-vc10-part-3.aspx
Pavel Minaev
As for the library, I can't find any definite document covering this. I compiled the list above by looking at what is provided in my VS2010 beta 2 install. Also note that the list above doesn't include library features that were present in TR1, and that were simply moved from `std::tr1::` to `std::` for C++0x (VC2010 supports such features in both namespaces).
Pavel Minaev
+2  A: 

For compiler support you can look here : C++0xCompilerSupport.

Compilers:

PAPER(S)
HP aCC
EDG eccp
gcc
Intel C++
MSVC
IBM XLC++
Sun C++
C++ Builder 2009/10

anno