Afficher un message
Vieux 07/02/2008, 07h56   #6
Pavel Shved
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: implementation of vector, deque

On 7 ÆÅ×, 08:58, "Alf P. Steinbach" <al...@start.no> wrote:

> At least if "constant time" is interpreted as "amortized constant time",
> as with push_back on a vector (where also the expression "constant time"
> is used).


How can `always takes constant time' in 23.2.1.3 section refer to
amortied cost? :-)

The standard is to write the worst cases. No amortized cost shall be
involved there.

P.S. For example, vector's push_back has amortized constant cost in
most common implementations, though the standard defines it to be no-
worst than linear.
  Réponse avec citation
 
Page generated in 0,06399 seconds with 9 queries