title: How to use std::sample together with QSet?
body: <p>I have a <code>QSet</code> and want to use a random unique subset of it. Is it anyhow (without much code) possible to use <code>std::sample</code> for it?</p>
  
  <p>Following code failes, because <code>std::back_inserter</code> is looking for <code>QSet::push_back</code>, which doesn't exists.</p>
  
  <pre><code>std::mt19937 gen((std::random_device()()));
  QSet&lt;MyType&gt; allOfMyTypes = {...};
  QSet&lt;MyType&gt; selectedMyTypes;
  std::sample(allOfMyTypes.begin(), allOfMyTypes.end(), std::back_inserter(selectedMyTypes), 4, gen);
  </code></pre>