<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi David, Sanjoy<div class=""><br class=""></div><div class="">Here’s an updated patch which provides all of the combinations of operator[+-] I can think to add.</div><div class=""><br class=""></div><div class="">All of the new ones are outside the class definition so that we can reduce duplication and have them call each other.</div><div class=""><br class=""></div><div class="">The one thing I noticed while doing this work was that the already existing operator+= and -= methods really did exactly what I wanted.  So i’ve implemented + and - in terms of += and -=.</div><div class=""><br class=""></div><div class="">Is that ok, or is it frowned upon?  I can imagine some people would prefer that += calls + and not the other way round.  But it is very convenient as you can see with this patch.</div><div class=""><br class=""></div><div class="">Comments very welcome.</div><div class=""><br class=""></div><div class="">BTW, this reduces total allocations by about 400k from 19.1M to 18.7M.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Pete</div><div class=""><br class=""></div><div class=""></div></body></html>