title: Lambda function does not compile with different signature
body: <p>I am trying out c++ lambda functions:</p>
  
  <p>This works:</p>
  
  <pre><code>std::function&lt;std::string(std::string)&gt;lambda = [] (std::string message) -&gt; std::string
     {
         return std::string("test");
     };
  </code></pre>
  
  <p>i can call the function with <code>std::cout &lt;&lt; lambda(std::string("in"));</code>, and it prints <code>"test"</code>.</p>
  
  <p>however if i pass another type (<code>std::istream</code>) it wont compile. A mapping from <code>std::istream</code> to any type, for example string should be the final goal. I'm going to use templates for this purpose. : </p>
  
  <pre><code>std::function&lt;std::string(std::istream)&gt;lambda = [] (std::istream message) -&gt; std::string
     {
         return std::string("test");
     };
  </code></pre>
  
  <p>This is the output from g++:</p>
  
  <pre><code>g++ -I"/home/***/workspace.cpp/unrealcv-renderer/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/unrealcv_renderer.d" -MT"src/unrealcv_renderer.o" -o "src/unrealcv_renderer.o" "../src/unrealcv_renderer.cpp"
  ../src/unrealcv_renderer.cpp: In constructor ‘event_camera_simulator::UnrealCVRenderer::UnrealCVRenderer(std::__cxx11::string, std::__cxx11::string)’:
  ../src/unrealcv_renderer.cpp:23:8: error: conversion from ‘event_camera_simulator::UnrealCVRenderer::UnrealCVRenderer(std::__cxx11::string, std::__cxx11::string)::&lt;lambda(std::istream)&gt;’ to non-scalar type ‘std::function&lt;std::__cxx11::basic_string&lt;char&gt;(std::basic_istream&lt;char&gt;)&gt;’ requested
          };
          ^
  </code></pre>
  
  <p>What is causing trouble here?</p>