title: c ++ typedef std::function<> How to use?
body: <p>Hi I am working on this project and in the header the file the following is defined</p>
  
  <pre><code>typedef std::function&lt;unsigned int(const std::string&amp;)&gt; HashFunction;
  </code></pre>
  
  <p>How exactly do i use this with my HashFunction? 
  When I try</p>
  
  <pre><code>HashFunction myHashFunction;
  myHashFunction("mystring");
  </code></pre>
  
  <p>the program crashes.</p>