I'm guessing it means "C++ has evolved to something worth considering versus more modern languages".
What do you think? Given a real world project, what might lead you to use modern C++ instead of Golang, Zig, Rust etc?
Or is C++ too old and dusty despite its updates?
Some references:
"Welcome back to C++ - Modern C++" https://learn.microsoft.com/en-us/cpp/cpp/welcome-back-to-cpp-modern-cpp?view=msvc-170
"21 New Features of Modern C++ to Use in Your Project" http://www.vishalchovatiya.com/21-new-features-of-modern-cpp-to-use-in-your-project/
"What is modern C++"? https://www.reddit.com/r/cpp_questions/comments/tgs6ir/what_is_modern_c/
"C++ is the next C++" https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2657r0.html
"modern c++ features" https://github.com/AnthonyCalandra/modern-cpp-features
C++ 23 to introduce module support "https://www.infoworld.com/article/3662808/c-plus-plus-23-to-introduce-module-support.html"
"C++ 2023" https://en.wikipedia.org/wiki/C%2B%2B23
Here's an example from ChatGPT (not checked for correctness)
int main() {
// Define an asynchronous task that returns a string
auto my_task = []() -> std::string {
return "Hello, world!";
};
// Call the task using async and wait for the result
auto future_result = std::async(std::launch::async, my_task);
std::string result = future_result.get();
// Print the result
std::cout << result << std::endl;
return 0;
}
"In this example, we define an asynchronous task using a lambda function. The lambda function returns a string, but since it is an asynchronous task, it is executed in a separate thread.Next, we use the std::async function to execute the task asynchronously. The std::async function takes two arguments: the launch policy and the function to execute. In this example, we use the std::launch::async policy to launch the function in a new thread. The std::async function returns a std::future object, which represents the result of the asynchronous operation.
Finally, we use the get method of the std::future object to wait for the result of the asynchronous operation. The get method blocks the calling thread until the asynchronous operation is complete and the result is available."
That said from an outsider perspective it seems that there’s no clear universal definition. Which is totally fine! It’s just more of a vibes-based term than a strict one.
"Welcome back to C++ - Modern C++" https://learn.microsoft.com/en-us/cpp/cpp/welcome-back-to-cp...
"21 New Features of Modern C++ to Use in Your Project" http://www.vishalchovatiya.com/21-new-features-of-modern-cpp...
"What is modern C++"? https://www.reddit.com/r/cpp_questions/comments/tgs6ir/what_...
"C++ is the next C++" https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p26...
"modern c++ features" https://github.com/AnthonyCalandra/modern-cpp-features
C++ 23 to introduce module support "https://www.infoworld.com/article/3662808/c-plus-plus-23-to-..."
"C++ 2023" https://en.wikipedia.org/wiki/C%2B%2B23
It has not gone anywhere.
C++ has slowly been losing some marketshare to Java and C# (late 90s and 00s) and more recently Rust (late 10s and early 20s / present), but the majority of C++ is still where it has been for decades.
clion even helps you close over variables in a lambda, which was a delight to discover.