From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30791 invoked by alias); 11 Oct 2002 14:46:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30775 invoked by uid 71); 11 Oct 2002 14:46:03 -0000 Date: Fri, 11 Oct 2002 07:46:00 -0000 Message-ID: <20021011144603.30771.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: libstdc++/8195: n-th algorithm (STL) doesn`t work properly Reply-To: Wolfgang Bangerth X-SW-Source: 2002-10/txt/msg00459.txt.bz2 List-Id: The following reply was made to PR libstdc++/8195; it has been noted by GNATS. From: Wolfgang Bangerth To: johnb@stl.sarov.ru, , Cc: Subject: Re: libstdc++/8195: n-th algorithm (STL) doesn`t work properly Date: Fri, 11 Oct 2002 09:42:48 -0500 (CDT) 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 itself. Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth