title: std::bind to local variable as a value
body: <p>Is it a good practice to bind to a value which is a local variable:</p>
  
  <pre><code>bool func(const std::string&amp; a, const std::string&amp; b)
  {
      return a + "abc" == b;
  }
  </code></pre>
  
  <p>......... </p>
  
  <pre><code>auto str = getRandomString();
  auto it = std::find_if(
      vec.begin(), 
      vec.end(), 
      std::bind(func, str, std::placeholders::_1));
  </code></pre>
  
  <p>As <code>std::bind</code> return value is a function object the for each local variable it create a new function object? Should I use lambda expression instead?</p>
  
  <pre><code>auto it = std::find_if(
      vec.begin(), 
      vec.end(), 
      [str](const std::string&amp; b){return str + "abc" == b;});
  </code></pre>