error: variable 'someVar' declared with deduced type 'auto' cannot appear in its own initializer.
It turns out you can achieve this (albeit a bit horribly) by passing the lambda to itself! See this article for details: artificial-mind.net/blog/2020/…
Peter Vágner reshared this.

Gerald Squelart
in reply to Jamie Teh • • •Recursive lambdas from C++14 to C++23 - Notes from /dev/null
www.dev0notes.com