comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Missing in Booch: range operations
Date: 8 Nov 2002 13:35:42 -0800
Date: 2002-11-08T21:35:42+00:00	[thread overview]
Message-ID: <1ec946d1.0211081335.6b2ac730@posting.google.com> (raw)
In-Reply-To: 3dcb8eec$0$307$bed64819@news.gradwell.net

porton@ex-code.com (Victor Porton) wrote in message news:<3dcb8eec$0$307$bed64819@news.gradwell.net>...
> 
> BTW, these should throw an exception if the begin and the end of the 
> range are from different containers.

Here's an analogy.  Suppose we have this:

   type T1 is access Integer;
   for T1'Storage_Pool use P1;

   type T2 is access Integer;
   for T2'Storage_Pool use P2;

   function Free2 is 
     new Unchecked_Deallocation (Integer, T2);

and now we do this:

   declare
     O1 : T1 := new Integer;
     O2 : T2 := T2 (O1);
   begin
     Free2 (O2);
   end;

Here, we allocate an object from the storage pool (P1) associated with
access type T1, but we deallocate that some object to the storage pool
(P2) associated with access type T2.

What should happen?

If your answer is "The behavior isn't defined by the language,
therefore you shouldn't do it.", then that same argument should apply
to iterator types (which are simply access types in disguise).



  parent reply	other threads:[~2002-11-08 21:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 10:09 Missing in Booch: range operations Victor Porton
2002-11-08 15:01 ` Stephen Leake
2002-11-08 21:07 ` Matthew Heaney
2002-11-09 13:56   ` Simon Wright
2002-11-13 20:17     ` Matthew Heaney
2002-11-08 21:35 ` Matthew Heaney [this message]
2002-11-09  8:24 ` Victor Porton
2002-11-13 20:22   ` Matthew Heaney
2002-11-13 22:28     ` Stephen Leake
2002-11-09  8:46 ` Victor Porton
2002-11-09 14:12   ` Simon Wright
2002-11-09 14:04 ` Simon Wright
2002-11-09 16:12 ` Victor Porton
2002-11-09 20:00   ` Simon Wright
2002-11-11  5:41 ` Victor Porton
2002-11-11  6:39   ` Simon Wright
2002-11-11  7:50 ` Victor Porton
2002-11-13 20:26   ` Matthew Heaney
2002-11-13 22:28     ` Stephen Leake
replies disabled

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