What new features appeared in C++17 and how to use them in real projects?
Hello everyone! I've been writing in C++ for about a year, mainly using C++11/14. I recently started learning C++17 and noticed that a lot of code in open-source projects uses constructs I don't understand.\n\nFor example, I often see code like this:\n
auto [x, y, z] = getPoint();\nOr this:\nif (auto it = map.find(key); it != map.end()) { ... }\nOr also this:\nstd::variant<int, float, std::string> v = 42;\n\nMy question: what exactly are the innovations brought by C++17? I've heard about structured bindings, if-init, std::variant, std::optional, but how do all these work in practice? Is there anything else worth knowing?\n\nI'm particularly interested in:\n1. Which features actually simplify everyday development?\n2. What changed in the standard library No answers yet.
Log in to leave an answer
Blogs
Code review in PHP: what to check and how to give feedback
# or javascript:void(0): what to choose for JS links?
Gradle 5.0: How to Fix Deprecated Features and Update a Kotlin Project
Hibernate hbm2ddl.auto: values, examples, and how it works under the hood