This repository contains a list of small tests regarding enhancements brought by the c++17 standard.
Note : Well, some of them do not really have to do with C++17 but seemed nice to incorporate here.
Here is the list of the concepts that I have tested :
- Copy ellision
- Chain evaluation order
- Remove an element in a std::vector in O(1) Timme
- Limit variables scope to if/else/switch statements
- constexpr if : Compile-time evaluations
- STL algorithms policies
- Playing with std::unique
- compress/decompress strings using std::tuples
- std::optional
- std::variant
- std::any
- std::regex
- std::byte
- std::map enhancements
- std::empty, std::size(), std::data()
- std::emplace() : the new receipe
- std::sample() algorithm
- Mathematical additions
- Implementing algorithms as std compliant iterators
- Memory handling of legacy APIs using smart pointers
- Redirect to file (or ignore) specific outputs
- Structural binding for custom class
Here is a list of benchmark that show the improvments of C++17 with numbers :