help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <>
Subject: Re: strange cursor in nested containers
Date: Tue, 9 May 2023 10:36:33 +0200	[thread overview]
Message-ID: <u3d0mh$70f5$> (raw)
In-Reply-To: <u3cg9c$5ppl$>

On 2023-05-09 05:56, Randy Brukardt wrote:
> It's not required to detect such cursors because it is expensive to do so
> perfectly (essentially, each cursor has to be controlled and one has to keep
> a list of them associated with the container). There are imperfect solutions
> which are likely to be "good enough" in practice, but they still have a
> (small) cost which may be an issue for some uses. Thus, most implementers
> don't use them. I know the original GNAT containers had a debugging version
> that included such checks, but I don't know if they still exist or how one
> would enable them if they do.

This cost is due to the decision to allow access to elements using only a 
cursor. If both the container and the cursor are needed, then the cost is 
significantly reduced. This is the approach that was used in the Ada-95 version 
of the PragmAda Reusable Components.

Jeff Carter
“Bug rates in C++ are running higher even than C ...”
Stephen F. Zeigler

  reply	other threads:[~2023-05-09  8:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19  7:09 strange cursor in nested containers Mario Blunk
2023-04-19 15:07 ` Simon Wright
2023-04-20  5:15 ` Egil H H
2023-04-20  5:33   ` Egil H H
2023-04-20 14:59   ` Simon Wright
2023-04-20 15:28     ` Mario Blunk
2023-04-22  9:33       ` Randy Brukardt
2023-04-22 17:04         ` Mario Blunk
2023-04-22 18:33           ` Jeffrey R.Carter
2023-04-25  7:30             ` Mario Blunk
2023-05-09  3:56               ` Randy Brukardt
2023-05-09  8:36                 ` Jeffrey R.Carter [this message]
2023-05-09  8:49                   ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox