A depiction of god yelling in the phone saying “I told you to stop that shit right now before reality starts flaking at the edges again

“If you don't stop using 'auto' and 'constexpr' right now I swear imma come down there and whoop your brain so hard you'll be snorting lines outta your IDE”
you are viewing a single comment's thread
view the rest of the comments
[–] [S] 3 points 1 year ago* (last edited 1 year ago) (2 children)

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

  • source
  • parent
  • hideshow 2 child comments