From -6717688761538288632
X-Google-Thread: 7894ca11fe,ddd5ced031b115a9,start
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 12 Dec 2009 20:30:14 -0600
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Joe Gottman <jgottman@carolina.rr.com>
Newsgroups: comp.std.c++
Subject: Proposed resolution to Library issue 780 is insufficient
Organization: EasyNews, UseNet made Easy!
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <FYAUm.366901$Jp1.44134@en-nntp-02.dc1.easynews.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Fri, 11 Dec 2009 18:54:10 -0500
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Sat, 12 Dec 2009 20:22:16 CST
Lines: 27
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-xm1/2BrmYLQPtyfVe+fmnhZG4qii60YMx86eGSrgtWR2p70cylzpdpdC4vEHbCaE6uc8YFTDeU0252d!kBhXb3iO27ahZKVoqWGXOUfzOW9Kt3ZQtil1J1Q1v1XY0QWsMDkcwU0DjuF3adKJaAi9xBfLxviR!fdriE4o=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:1904

The proposed resolution to Library issue 780 ( std::merge()
specification incorrect/insufficient) is still not sufficient.  The
proposed resolution gives the effects of merge as the following:

"Copies all the elements of the two sorted ranges [first1,last1) and
[first2,last2) into the range [result,result + (last1 - first1) +
(last2 - first2)) , such that resulting range will be sorted in
non-decreasing order; that is for every pair of iterators i and j of
either input ranges, where *i was copied to the output range before *j
was copied to the output range, the condition *j < *i or,
respectively, comp(*j, *i) will be false."

This ignores the question of the order in which equivalent elements
are copied.  If an element x1 of [first1, last1) is equivalent to an
element x2 of [first2, last2), then x1 should be copied to the output
range before x2 is.  Otherwise, it would be impossible to implement
stable_sort() with a mergesort algorithm that uses std::merge().


Joe Gottman

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



