r/programmingcirclejerk • u/OorNaattaan • 24d ago
Note that we’re not actually going to be using C++20 coroutines. I’m just using the co_yield keyword.
https://brevzin.github.io/c++/2026/11/04/operator-for/
69
Upvotes
35
u/al2o3cr 24d ago
Token sequences + template metaprogramming would produce the most AMAZING error messages
31
u/imachug 24d ago
Posting anything related to modern C++ on this subreddit is cheating at this point
57
u/dingwinger1225 24d ago
this reminds me of when I needed to split a string in c++ once and someone posted similar syntax vomit and said it's a mark of the elegance of the STL
28
u/dangerbird2 in open defiance of the Gopher Values 24d ago
show this to someone in 2005 and they'd say it's Erlang or some shit
26
u/daidoji70 24d ago
Jesus I swear c++ is a disease of the mind.
3
u/itzjackybro 20d ago
This is literally reinventing Rust proc-macros.
2
u/Major_Barnulf LUMINARY IN COMPUTERSCIENCE 14d ago
It is $CURRENT_YEAR and c++ is still pioneering new ways to reinvent the for-loop