C++ 2017 ✦ Tested

// in a header inline int global_counter = 0; Mandates copy elision for prvalues, making certain moves/constructors unnecessary even conceptually.

template <typename T> auto to_string(const T& t) if constexpr (std::is_integral_v<T>) return std::to_string(t); else return std::string(t); // only instantiated if T is not integral c++ 2017

namespace fs = std::filesystem; for (auto& p : fs::directory_iterator(".")) std::cout << p.path() << '\n'; // in a header inline int global_counter =

Compile-time conditional compilation inside templates, discarding non-taken branches entirely. Type-safe union

std::vector<int> v(1'000'000); std::for_each(std::execution::par, v.begin(), v.end(), [](int& x) x *= 2; ); Portable filesystem operations: paths, directories, permissions, etc.

Type-safe union.

Memory resources for container allocators, enabling custom memory management without recompiling container code. 3.8 std::clamp , std::gcd , std::lcm int x = std::clamp(5, 0, 10); // 5 int g = std::gcd(12, 18); // 6 3.9 Splicing for Maps and Sets Extract and insert nodes from associative containers without reallocation.