C++ 2017 __hot__ -

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.

void print(std::string_view sv) std::cout << sv; c++ 2017

print("temporary"); // no allocation Most STL algorithms gained execution policy overloads: seq , par , par_unseq . Memory resources for container allocators

std::map<int, std::string> m = 1, "a"; for (const auto& [key, val] : m) // key = 1, val = "a" std::cout << key << ": " << val << '\n'; std::lcm int x = std::clamp(5

std::optional<int> parse_int(const std::string& s) try return std::stoi(s); catch(...) return std::nullopt;