================
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - modernize-use-static-lambda
+
+modernize-use-static-lambda
+===========================
+
+Finds lambdas with an empty capture list (``[]``) that are not already marked
+``static`` and suggests adding the ``static`` specifier (introduced in C++23).
+
+A non-capturing lambda does not depend on any enclosing state.  Marking it
+``static`` makes that property explicit in the source and enables the implicit
+conversion-to-function-pointer to return a direct pointer to ``operator()``
----------------
zwuis wrote:

This is wrong. Please read https://en.cppreference.com/cpp/language/lambda 
again.

https://github.com/llvm/llvm-project/pull/196893
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to