This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible bug in list::size()? Or my misreading?


On Thu, Jan 03, 2002 at 05:20:06PM -0400, Brad Spencer wrote:
> Please tell me I've just misunderstood this all these years, but my
> copy of the standard says, in Section 23.1, Table 65:
> 
>   Those entries marked "(Note A)" should have constant complexity.
> 
> Sure enough, size() is marked with "(Note A)".  However, the trivial
> program below is enough to show that this is not the case and list
> computes its size in O(n) with each call to size!  What have I missed?


    http://www.sgi.com/tech/stl/FAQ.html

I should probably restate this in our own docs.  Yeah.


Phil
-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]