C++ 20 Feature List Finalized
Written by Alex Denham   
Friday, 02 August 2019

The ISO C++ Committee has decided what features will be included in the next C++ standard, with many improvements and new features including modules, concepts and coroutines. C++ 20 is due to be published by February 2020.

This is the largest release of C++ since C++11, and the list of major new features is impressive:

  • modules
  • coroutines
  • concepts including in the standard library via ranges
  • <=> spaceship including in the standard library
  • broad use of normal C++ for direct compile-time programming, without resorting to template metaprogramming (see last trip reports)
  • ranges
  • calendars and time zones
  • text formatting
  • span

cplus

 

The inclusion of support for modules will do away with the need to use the current #include system, and will let C++ programmers divide code into logical parts in a way more similar to other languages. 

Coroutines are functions that can suspend execution to be resumed later. They're stackless and suspend execution by returning to the caller, meaning you can have sequential code that executes asynchronously.

Concepts are included in a library defining fundamental concepts that can be used to perform compile-time validation of template arguments. The concepts will also mean function dispatch can be performed based on properties of types. These concepts provide a foundation for equational reasoning in programs.

One major improvement that was due to be included but which has now been removed from the feature list is contracts. Contracts allow preconditions, postconditions, and assertions to be expressed in code using a uniform syntax, with options such as having different contract levels and custom violation handlers. However, the committee decided that as there are still 'lingering design disagreements and concerns', the inclusion of the feature has been deferred and a new study group for contracts has been created. 

There's an in-depth write-up of what has and hasn't made it into C++20 by members of the committee on Reddit.

cplus 

 

.

More Information

ISO C++ Organization

Related Articles

Bjarne Stroustrup Thinks He Has A Better Way To Do Generics

C++ Where Is It Heading? C++17

In Praise Of C++ Bjarne At ICPC

Why your next language better be C++ 

The Irrelevance of the New C++ Standard

Programming: Principles and Practice Using C++, 2nd Ed (book review)

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Extend NGINX With The New JavaScript Module
28/10/2024

Inject middleware functionality into NGINX with the expressive power of Javascript. NGINX JavaScript or NJS for short is a dynamic module under which you can use scripting for hooking into the NGINX e [ ... ]



Looking Forward To NAO 7
03/11/2024

Introduced to the world in 2004 by its creator Bruno Maisonnier the kid-sized, autonomous humanoid robot NAO, turns 20 this year. At less than 2 ft tall, it is small in stature, but plays a big r [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 02 August 2019 )