From 1196348743926306156
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,96f81efc956a13a5
X-Google-Attributes: gidf78e5,public
From: "Markus Mauhart" <mmauhart@ping.at>
Subject: Re: Defect Report: 25.3.6 [lib.alg.heap.operations] - incorrect description
Date: 1999/09/29
Message-ID: <7sq34n$q3b$2@fleetstreet.Austria.EU.net>#1/1
X-Deja-AN: 530811382
Content-Transfer-Encoding: quoted-printable
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7sleo1$j0v$1@fleetstreet.Austria.EU.net> <37ee8824.41559027@news.csrlink.net>
X-Original-Date: Tue, 28 Sep 1999 11:10:53 +0200
X-Priority: 3
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: ariel.ucs.unimelb.edu.au 938631012 15085 128.250.37.153 (29 Sep 1999 18:50:12 GMT)
Organization: Customer of EUnet Austria
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN/JfUeEDnX0m9pzZAQHcAAF+J7U+qaH/wYQ0oc80Mveanihh6G/PA+pY LN84avf68jI6BMG3RdrKwC2MYMrAMjGI =H/HC
X-MSMail-Priority: Normal
Mime-Version: 1.0
NNTP-Posting-Date: 29 Sep 1999 18:50:12 GMT
Newsgroups: comp.std.c++

John Potter <jpotter@falcon.lhup.edu> wrote:
>=20
> This is a nit-pick, but if changed, you have a good version.

I dont know the german translation of 'nit-pick', but it sounds very
appropriate for a thing not worth a DR (but IMHO worth 5 minutes work
when actually typesetting a new release of the standard).

Concerning respecting of insertion order for heap and priority_queue,
as their standard-defined behaviour follows the classic entities with
same name, this choosen behaviour and naming is one of the many topics
where the standard is perfect, especially my assumption that mentioning
insertion order was forgotten by accident was incorrect which makes
that part of my DR a NAD.

// some discussions of the problem to implement a generally useful
// priority_queue respecting insert order.

Having considered some of that problems, when I read the name
"priority_queue" in the standard I immediately praised the people
who seemed to have solved these problems for me. Then I realized that
they seemed to have forgotten to mention 'respecting insert order' in
the description ..

> sensitive.  The CS knowledge that heap based priority queue, heap =
sort,
> and quick sort are unstable is needed here.  Whether the standard

Knowledge of instability was not enough for me. I noticed the "not =
stable"
in std::heap's description (and assumed this to be 'true', cause it's
unlikely to warn for unstability by accident), but as long as one does
not expose the whole container via the interface (and heap and prio_q..
only provide its top), its exposed 'top' could respect the order.

Btw, I'd consider a standard with an explicit note concerning the
probably unexpected behaviour of priority_queue a better standard.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



