std::variant
The class template std::variant represents a type-safe union. An instance of std::variant at any given time holds a value of one of its alternative types (it's also possible for it to be valueless). std::optional
The class template std::optional manages an optional contained value, i.e. a value that may or may not be present. A common use case for optional is the return value of a function that may fail. std::any
A type-safe container for single values of any type. std::string_view
A non-owning reference to a string. Useful for providing an abstraction on top of strings (e.g. for parsing). Parallel algorithms
Many of the STL algorithms, such as the copy, find and sort methods, started to support the parallel execution policies: seq, par and par_unseq which translate to "sequentially", "parallel" and "parallel unsequenced". |
std::invoke
Invoke a Callable object with parameters. Examples of Callable objects are std::function or std::bind where an object can be called similarly to a regular function. std::apply
Invoke a Callable object with a tuple of arguments. std::filesystem
The new std::filesystem library provides a standard way to manipulate files, directories, and paths in a filesystem. Here, a big file is copied to a temporary path if there is available space. |
std::byte
The new std::byte type provides a standard way of representing data as a byte. Benefits of using std::byte over char or unsigned char is that it is not a character type, and is also not an arithmetic type; while the only operator overloads available are bitwise operations. Note that std::byte is simply an enum, and braced initialization of enums become possible thanks to direct-list-initialization of enums. Splicing for maps and sets
Moving nodes and merging containers without the overhead of expensive copies, moves, or heap allocations/deallocations. |
Cheatography
https://cheatography.com
Modern C++ 17 Standard Library Features Cheat Sheet by NexWebSites
New features included in the C++ 17 Standard Library
Created By
https://nexwebsites.com
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by NexWebSites