title: boost transform iterator and c++11 lambda
body: <p>I'm trying to use boost::adaptors::transformed by providing a c++0x lambda to the adaptor. </p>
  
  <p>The following code does not compile. I'm using g++ 4.6.2 with boost 1.48.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  #include &lt;boost/range/adaptors.hpp&gt;
  #include &lt;boost/range/algorithm.hpp&gt;
  
  using namespace std;
  namespace br    = boost::range;
  namespace badpt = boost::adaptors;
  
  
  int main()
  {  
    vector&lt;int&gt; a = {0,3,1,};
    vector&lt;int&gt; b = {100,200,300,400};
  
    auto my_ftor = [&amp;b](int r)-&gt;int{return b[r];};
  
    cout&lt;&lt;*br::max_element(a|badpt::transformed(my_ftor))&lt;&lt;endl;
  }
  </code></pre>
  
  <p>Any ideas on what I'm doing wrong here?</p>