CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Extract lambda parameter

Last modified: 15 September 2023

The Extract Lambda Parameter refactoring helps you extract an expression or statement into a new parameter with a lambda expression passed as a corresponding argument. For example, this could be a comparator passed to a sorting function.

The following demo illustrates the usage of the Extract Lambda Parameter refactoring, as well as Extract Function, Extract Parameter, and Live Templates: