libstdc++/8195: n-th algorithm (STL) doesn`t work properly

Wolfgang Bangerth
Fri Oct 11 07:42:00 GMT 2002

This is not a bug, so may be closed.

nth_element does not sort the _entire_ array, it only makes sure that the 
elements before the nth-pointer are smaller, and the ones behind that are 
larger than the element pointed to by nth (the second argument). It makes 
no guarantees that each of these two parts of the entire range is sorted 


Wolfgang Bangerth              email: 

More information about the Gcc-bugs mailing list