title: Write a function that accepts a lambda expression as argument
body: <p>I have a method like this</p>
  
  <pre><code>template&lt;typename T, typename U&gt;
  map&lt;T,U&gt; mapMapValues(map&lt;T,U&gt; old, T (f)(T,U))
  {
      map&lt;T,U&gt; new;
      for(auto it = old.begin(); it != old.end(); ++it)
      {
          new[it-&gt;first] = f(it-&gt;first,it-&gt;second);
      }
      return new; 
  }
  </code></pre>
  
  <p>and the idea is that you'd call it like this</p>
  
  <pre><code>BOOST_AUTO_TEST_CASE(MapMapValues_basic)
  {
      map&lt;int,int&gt; test;
      test[1] = 1;
      map&lt;int,int&gt; transformedMap = VlcFunctional::mapMapValues(test, 
          [&amp;](int key, int value) -&gt; int
          {
              return key + 1; 
          }
      );
  }
  </code></pre>
  
  <p>However I get the error: no instance of function template "VlcFunctional::mapMapValues" matches the argument list argument types are: (std::map, std::allocator>>, __lambda1)</p>
  
  <p>Any idea what I'm doing wrong? Visual Studio 2008 and Intel C++ compiler 11.1</p>