Compile-time conditional compilation inside templates, discarding non-taken branches entirely.
g++ -std=c++17 program.cpp clang++ -std=c++17 program.cpp cl /std:c++17 program.cpp # MSVC C++17 is often described as a "quality-of-life" release because it addressed many everyday pain points without introducing radical new paradigms (unlike C++11 or C++20). It made C++ more approachable and efficient, and most codebases quickly adopted its features. c++ 2017
namespace fs = std::filesystem; for (auto& p : fs::directory_iterator(".")) std::cout << p.path() << '\n'; Compile-time conditional compilation inside templates
print("temporary"); // no allocation Most STL algorithms gained execution policy overloads: seq , par , par_unseq . par_unseq . template<
template<typename... Args> auto sum(Args... args) return (args + ...); // right fold
Allows declaring a variable scoped to the statement.