From Jason Turner
Watch on YouTube

Summary

This episode continues Jason's series on modernizing C++ code, focusing on migrating from C++14 to C++17. He demonstrates powerful C++17 features including the [[nodiscard]] attribute for preventing discarded return values, std::string_view for avoiding unnecessary string allocations, std::from_chars for string parsing, default member initializers, and std::gcd/std::lcm for mathematical operations. The episode also shows how replacing std::string with std::string_view enables making more functions constexpr while simultaneously improving performance by reducing allocations.

Resources

Tags