Inhaltsverzeichnis

Modernes C++

This is about computer mechanics… What happens when you take your favoured programming language and send it to the shop for a 60000 mile tune-up?
— Bjarne Stroustrup1)

Seit 2011 wird das „klassische“ C++982) im 3-Jahres-Rhythmus weiterentwickelt (siehe Zeitleiste). Aktuelle Compiler unterstützen „modernes“ C++113), C++144), C++175), C++206), C++237) zunehmend. Technische Spezifikationen (TS) und andere Vorschläge können in den nächsten Entwurf einfließen. Die folgenden Listen sind unvollständig und in ihrer Reihenfolge subjektiv.

C++23

“Pandemic Edition” … not slowing down.
— Herb Sutter8)

C++20

… our biggest nine-year-cycle yet … in terms of new features added.
— Herb Sutter10)

C++17

If you can look at a screenful of code and tell that it’s C++17, then we’ve changed the way we program C++.
— Herb Sutter14)
  std::pair p{1, 'a'};            // pair<int,char>
  auto [n, c] = p;                // structured bindings 
  for (auto [key, value] : mymap) /* ... */;
  if (auto [it, success] = mymap.insert({key, value}); success) use(it);

C++14

…completes C++11.

C++11

It feels like a new language.
— Bjarne Stroustrup
1)
Bjarne Stroustrup: C++0x Initialization Lists. Google Tech Talk (2007-02-21).
2)
ISO International Standard ISO/IEC 14882:1998(E) – Programming Language C++. (1989-09). „Bugfix“ C++03 (2003-10).
Technical Report on C++ library extensions. N1836, (2005).
3)
Frei zugänglich: ISO C++ Working Draft (C++11 WD) = ISO Standard C++ 2011 + Bugfixes N3337 (2012-01-16).
4)
N3796. Frei zugänglich: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3797.pdf (2013-10-13).
Herb Sutter: We have C++14! (2014-08-18).
5)
DIS N4660. Frei zugänglich: Working Draft N4659 (2017-03-21).
Herb Sutter: C++17 is formally approved. (2017-09-06)
Thomas Köppe: Changes between C++14 and C++17 DIS. P0636R0 (2017-04-02)
http://stackoverflow.com/questions/38060436/what-are-the-new-features-in-c17 (2016-06-30)
6)
ISO International Standard ISO/IEC 14882:2020(E) – Programming Language C++. (2020-12).
DIS N4860. Frei zugänglich: Working Draft N4861 (2020-04-01).
Bryce A. Lelbach: C++20 is done! (2020-02-15)
Herb Sutter: Trip report: Winter ISO C++ standards meeting (Prague) (2020-02-15).
Herb Sutter: C++20 approved. (2020-09-06).
8)
Herb Sutter: C++23 Pandemic Edition is complete. WG21 Winter Meeting Issaquah Trip Report. (2023-02-13)
11)
Compiler und Build-Infrastruktur erfordern Änderungen. Clang, Visual C++ und GCC experimentieren mit Modulen: Beispiel mit g++ 11, C++20 Modules Status Report.
12)
Von range-v3 wurde (bisher) nur eine kleine Auswahl übernommen. Wichtige, nützliche Bausteine wie action::sort, unique, enumerate, zip oder to<std::vector> fehlen. Siehe auch: rangesnext.
13)
Siehe P2168R0. Bibliotheken: cppcoro (basiert auf Boost), rangesnext, Visual C++ bietet <experimental/generator>.
14)
Herb Sutter: Oulu trip report (2016-06-30).
15)
„destructuring declaration“ in Kotlin, „destructuring assignment“ in Javascript, „tuple assignment“/„unpacking“ in Python
16)
> std::chrono::nanoseconds{7.2e18}. Die Mühlen des ISO-C++-Komitees mahlen langsam. To Sheldon Cooper: No sarcasm sign here.