title: How to set a range of elements in an stl vector to a particular value?
body: <p>I have a vector of booleans.  I need to set its elements from n-th to m-th to <code>true</code>.  Is there an elegant way to do this without using a loop?</p>
  
  <p>Edit:  Tanks to all those who pointed out the problems with using <code>vector&lt;bool&gt;</code>.  However, I was looking for a more general solution, like the one given by jalf.</p>