title: Does boost have a datatype for set operations that is simpler than the STL?
body: <p>I find <a href="https://stackoverflow.com/a/284004/794283">the C++ STL method</a> of doing simple set operations quite clunky to use. For example, to find the difference between two sets:</p>
  
  <pre><code>std::set&lt;int&gt; newUserIds;
  set_difference(currentUserIds.begin(), currentUserIds.end(), mPreviousUserIds.begin(), mPreviousUserIds.end(), std::inserter(newUserIds, newUserIds.end()));
  std::set&lt;int&gt; missingUserIds;
  set_difference(mPreviousUserIds.begin(), mPreviousUserIds.end(), currentUserIds.begin(), currentUserIds.end(), std::inserter(missingUserIds, missingUserIds.end()));
  mPreviousUserIds = currentUserIds;
  </code></pre>
  
  <p>Does boost offer an alternative set of classes that would reduce the above example to something like this:</p>
  
  <pre><code>set_type&lt;int&gt; newUserIds = currentUserIds.difference(mPreviousUserIds);
  set_type&lt;int&gt; missingUserIds = mPreviousUserIds.difference(currentUserIds);
  </code></pre>
  
  <p>(Similar to <a href="http://qt-project.org/doc/qt-5.0/qtcore/qset.html" rel="noreferrer">QSet</a> in Qt which overrides <code>operator-</code> in this way.)</p>