title: Copy index of vector Elements with condition
body: <p>I want to save the indices of my bool vector where the vector element is false.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>vector&lt;bool&gt; incumbent_solution; // (0,0,0,1,1,0,0)...
  vector&lt;int&gt; I_minus_S(incumbent_solution.size());
  
  auto it = copy_if(incumbent_solution.begin(), incumbent_solution.end(),
          I_minus_S.begin(), [&amp;incumbent_solution](auto i) {if (incumbent_solution[i] == 0] return i; });
  I_minus_S.erase(it, I_minus_S.end());
  </code></pre>
  
  <p>But it only stores True in my Vector and not the indices.
  What is my lambda doing wrong?</p>