title: Is there a standard abstraction for semirings or monoids in C++?
body: <p>Does boost, or any other common C++ library, provide <a href="http://en.wikipedia.org/wiki/Semiring">semiring</a> or <a href="http://en.wikipedia.org/wiki/Monoid">monoid</a> abstractions (such as a template class)?</p>
  
  <p>I have some algorithms that I would like to express in terms of these abstract structures, but so far I haven't come across anything. I can write my own, but ideally these would be in a library I'm already using such as boost.</p>
  
  <p>Thanks!</p>