Use a lambda as a parameter for a C++ function
<p>I would like to use a lambda as a parameter for a C++ function, but I don't know which type to specify in the function declaration. What I would like to do is this:</p>

<pre><code>void myFunction(WhatToPutHere lambda){
    //some things
}
</code></pre>

<p>I have tried <code>void myFunction(auto lambda)</code> and <code>void myFunction(void lambda)</code> but none of these codes compiled. In case it matters, the lambda doesn't return anything.</p>

<p>How can I use a lambda as a parameter in a C++ function?</p>