title: Combine boost::lexical_cast and std::transform
body: <p>I would like to write something like this, which cannot be compiled:</p>
  
  <pre><code>std::vector&lt;A&gt; as;
  std::vector&lt;B&gt; bs( as.size() );
  std::transform( as.beginn(), as.end(), bs.begin(), boost::lexical_cast&lt;B&gt; );
  </code></pre>
  
  <p>But this is not working, so I created a functor which is doing this for me:</p>
  
  <pre><code>template&lt;typename Dest&gt;
  struct lexical_transform
  {
      template&lt;typename Src&gt;
      Dest operator()( const Src&amp; src ) const
      {
          return boost::lexical_cast&lt;Dest&gt;( src );
      }
  };
  </code></pre>
  
  <p>Is there an easier way to do this?</p>