Exploring C ++ 0x Features

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

+7
c ++ c ++ 11
source share
6 answers

An easy and interesting way to find out about this is to watch the C ++ 0x Google Techtalk Overview . Another good source is the Bjarne Stroutstrup C ++ 0x FAQ , which covers a huge part of the new features.

+11
source share

For VC ++ 2010, here is a list of things that will be there.

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

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

Libraries:

  • <stdint.h> / <cstdint> and all typedefs inside (finally!)
  • std::unique_ptr , std::shared_ptr and std::weak_ptr
  • std::forward_list
  • std::tuple and related things (e.g. tie , get ...)
  • <system_error>
  • <type_index>

What is NOT :

  • initializer lists (oddly enough, the <initializer_list> header is and contains the corresponding type, but it does not seem to have language support in beta 2)
  • variadic templates
  • constexpr
  • based on the for range (although the for each language extension, which basically seems to remain)
  • Unified initialization syntax {}
  • alternative function syntax (which mimics lambdas)
  • constructor delegation
  • row field initializers of the same name
  • [[override]] (but override remains as a language extension)
  • =default and =delete for members
  • enum class
  • using for type and pattern aliases
  • char16_t and char32_t , and the corresponding string literals
  • source and user string literals
  • sizeof in instance fields without an object instance
  • std::thread and friends
+3
source share

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

Compiled by:

PAPER (S)
HP aCC
Edg eccp
NKU
Intel C ++
Msvc
IBM XLC ++
Sun C ++
C ++ Builder 2009/10

+3
source share

Not a duplicate, but you can get answers here. There are links to projects and a list of compilers that implement C ++ functions [0 | 1] x

0
source share

You must be aware of the official website of the working group for ISO / IEC JTC1 / SC22 / WG21 . This has committee information, so it contains official documents that are under development. However, this is not necessarily the best place to learn about the background ideas of the various suggested ideas for C ++ 0x.

Another place to look is the comp.std.c ++ newsgroup ; it often has esoteric discussions about the little things of possible features.

0
source share

This is not a language feature, but you can take a look at TR1 . This is the specification of libraries that will be most similar to C ++ 0x.

There are actual implementations, so you can play with it right now (e.g. VC ++) .

0
source share

All Articles