title: boost::trim each string in std::vector<std::string>
body: <p>I'm currently stuck finding the correct syntax for trimming each string in a std::vector.</p>
  <p>I tried</p>
  <pre><code>std::vector&lt;std::string&gt; v;
  std::for_each(v.begin(), v.end(), &amp;boost::trim);
  </code></pre>
  <p>which gave me the following error messages in MSVC7.1.</p>
  <blockquote>
  <p>error C2784: '_Fn1 std::for_each(_InIt,_InIt,_Fn1)' : could not deduce template argument for 'T1' from 'std::vector&lt;_Ty&gt;::iterator' with [_Ty=std::string] : see declaration of 'std::for_each'</p>
  <p>error C2896: '_Fn1 std::for_each(_InIt,_InIt,_Fn1)' : cannot use function template 'void boost::algorithm::trim(SequenceT &amp;,const std::locale &amp;)' as a function argument : see declaration of 'boost::algorithm::trim'</p>
  </blockquote>
  <p>If I explicitly give the template parameter trims second parameter can not be found by the compiler, though its set by default.</p>
  <pre><code>std::for_each(v.begin(), v.end(), &amp;boost::trim&lt;std::string&gt;);
  </code></pre>
  <blockquote>
  <p>error C2198: 'void (__cdecl *)(std::string &amp;,const std::locale &amp;)' : too few arguments for call through pointer-to-function</p>
  </blockquote>
  <p>I was wondering how the correct syntax to call trim for each element in <code>v</code> would look like.</p>