title: iterate over all boolean combinations
body: <p>in a function I want to test I have ~10 booleans, that changes the result of my function by a series of if-else, etc.
  I'd like to run all the possible combinations automatically. I think of doing a std::vector, each element pointing to one of my 10 booleans.
  Now is there a generic algorithm to iterate through all combinations of bool values in my vector?</p>
  
  <p>thanks</p>