







It’s a vibe.
You’re welcome. Just don’t blame me when your brain starts cursing in foreign languages you don’t even know. ;)
The problem is that lambdas with a capture aren’t strongly typed are uniquely typed, so you have to use decltype/auto. And if you pass such a lambda to a function you’ll have to use auto as well.
If you write a lambda with a capture that calls itself recursively you’ll have to pass it to itself as an auto argument as part of the call signature.
I think this article explains it better: https://artificial-mind.net/blog/2020/09/12/recursive-lambdas
Edit: fixed wrong terminology
Back when I made this, GCC/clang were crashing left and right while compiling my project because of constexpr and auto usage with nested lambdas. It got worse with every template being evaluated until the compiler and my IDE started crashing.
I was making a react-like UI component library with all the new bells and whistles of modern C++. It was fun at first then the issues cropped up and it kinda killed my passion for the language and drove me away entirely.
Not sure about its state nowadays though.
bool isEven(int value) {
return (int)(((double)value / 2.0) % 1.0) * 100) != 50;
}
My boys are otherwise engaged…


What can I say? He’s a natural.


He’s basically pressing buttons to see what sticks