How to declare a vector of functions (lambdas)
<p>I have seen how to declare a vector of functions (see <a href="https://stackoverflow.com/questions/15128444/c-calling-a-function-from-a-vector-of-function-pointers-inside-a-class-where-t">calling a function from a vector</a>).</p>

<p>But that answer users pointers. How can I create a vector of functions/lambdas using the new syntax in modern C++?</p>

<p>the examples of functions using the new syntax typically use auto:</p>

<pre><code>auto f = [] (std::string msg) -&gt; void { 
    std::cout &lt;&lt; msg &lt;&lt; std::endl;
};
</code></pre>

<p>What is the actual type of f? so I can declare a vector of this type?</p>

<p>thank you very much for any help</p>