Lambda without parentheses
Use case
Cleaner lambdas with no parameters.
Explanation
[]{} is now valid instead of [](){}. Small but reduces visual noise.
Code
#include <print>
#include <thread>
int main() {
auto analyzer = [] { std::println("Running analysis."); };
analyzer();
return 0;
}
Output
$ ./src/c++23/build/lambda-without-parentheses
Running analysis.