output iterator in find_within_range

Michael Zillich zillich at acin.tuwien.ac.at
Tue Jul 29 13:29:07 UTC 2008


Hello,

It seems to me that one could change in the function _M_find_within_range
  *__out++ = _S_value(__N);
to
  __out = _S_value(__N);

as operator++() has not effect on a back_insert_iterator and operator*() 
simply returns *this.
At least this is the case for the STL back_insert_iterator.
Don't know if that would result in any speedup though. Just thought it "looks" 
faster :)

Michael



More information about the libkdtree-devel mailing list