Exceptional coding style

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jan 15 13:30:41 PST 2013


On Tue, Jan 15, 2013 at 09:23:08PM +0000, Stewart Gordon wrote:
> On 15/01/2013 10:20, FG wrote:
> <snip>
> >All thanks to a terrible naming decision...
> >It's not remove but move_to_end. Why call it remove?
> 
> It doesn't necessarily move them to the end, going by
> http://www.cplusplus.com/reference/algorithm/remove/
> "The relative order of the elements not removed is preserved, while
> the elements past the new end of range are still valid, although
> with unspecified values."
[...]
       ^^^^^^^^^^^
       Very scary, but unfortunately much too frequent in C/C++.


T

-- 
If lightning were to ever strike an orchestra, it'd always hit the conductor first.


More information about the Digitalmars-d mailing list