about
10/27/2022
C++ Bites Survey
C++ Bites Code

CppBites - Survey

C++ Core, C++11, C++14, C++17, C++20

C++ is a large, powerful, and complex language. The pages in this "CppBites" thread discuss the C++ programming language in relatively small bite-sized chunks. It is intended to complement the C++ Story The language comes in two parts. The core language was defined by standards C++98 and C++03. Additions, refinements, and simplifications have been added in standards C++11, C++14, C++17, and C++20. The language, as ammended by C++11 ... C++20, is referred to as "modern C++".

Table 1. - C++ core features

Feature Contents
memory model static, stack, heap
type system primitive, library, user-defined
Classes layout, anatomy, default operations
Templates template functions and classes
Standard Template Library
containers, iterators, and algorithms
The table below summarizes additions and modifications to C++ in recent editions starting with C++11.

Table 2. - C++ feature additions

C++ 11 Contents
auto type inference declaration
shared_ptr reference counting smart pointer
range-based for loops iterations over collections
move transfer ownership of resources
lambdas local anonymous functions
variadic templates auto generated template arguments
more things
more additions and refinements
C++ 14 Contents
function return type deduction declare type deduced by compiler
variable templates variables with template types
aggregate member initialization initializes aggregate from braced initialization list
generic lambdas declare parameter type deduced by compiler (auto, auto&)
shared_mutex provides both shared and exclusive access
tuple addressing via type access members by type, not position
quoted stream read and write quoted strings without editing
more things
more additions and refinements
C++ 17 Contents
if constexpr compile time switch
structured bindings bind bracketed list to aggregate, yields named member values
fold expression expands parameter pack (from variadic) over binary operator
std::filesystem() library for managing directory access
std::apply() invoke callable object with tuple of arguments
std::any() type-safe container for any copy-able type
more things
more additions and refinements
C++ 20 contents
concepts type bounds for template arguments
ranges interator-like object that contains members that are return types for iterator methods, e.g., begin for begin(), end for end()
std::format string formatting library
modules share declarations and definitions across translation units
coroutines function that can suspend execution to be resumed later
operator <=> declaration provides defaulted operations for <, =, >
__FILE__ and __LINE__ compile-time constants for current file and source line
more things
more additions and refinements

References

reference comments
Wikipedia C++ Survey of language origin, evolution, and properties
C++ 11 - Herb Sutter video Survey of important advancements
Back to Basics - Herb Sutter video Thoughtful advice about developing with C++
C++ 11 - Wikipedia Survey of C++ 11 standard
Writing good C++14 by default - Herb Sutter video Writing relatively simple and clear C++ using features of C++14
C++ 14 - Wikipedia Survey of C++ 14 standard
C++ 17 the good and ugly - Nicolai Josuttis video Informed opinions about C++ 17
C++ 17 features - Bryce Lelbach video Survey of selected features
C++ 17 - Wikipedia Survey of C++ 17 standard
Almost complete overview of C++20 - Marc Gregoire video Survey of C++ 20 standard
C++ 20 - Wikipedia Survey of C++ 20 standard
   
  Next Prev Pages Sections About Keys