title: c++ boost combine crc checksum
body: <p>I have one directional graph where for every item I compute the a crc represents its own data + the data of the items it points too.</p>
  
  <p>To avoid recomputing the data of one item multiple times I would like to use already computed crc for the items. Or in pseudo code:</p>
  
  <pre><code>crc = process_data(data);
  
  for (auto item : items)
      crc = combine_magic(crc, item.crc());
  </code></pre>
  
  <p>The question is what combine_magic should be. I use boost crc library, but I did not find such function there. Simply using xor is a bad idea, because I might finish of some items pointed even number of times - which will eliminate them from the equation. Zlib seems to offer such function <a href="https://github.com/madler/zlib/blob/master/crc32.c" rel="nofollow">https://github.com/madler/zlib/blob/master/crc32.c</a>, but I would like to avoid adding one more dependency.</p>