comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: Question about controlled types.
Date: Thu, 07 Feb 2008 04:54:06 GMT
Date: 2008-02-07T04:54:06+00:00	[thread overview]
Message-ID: <O9wqj.10053$EK3.1584@trndny04> (raw)
In-Reply-To: <47aa5ca6$0$32487$4d3efbfe@news.sover.net>

Peter C. Chapin wrote:
> 3. Copy the components of the anonymous object to A without using Adjust.

This is ill-advised. Objects may hold pointers to their own
submembers. If you assign without adjusting, those internal
pointers will point to the anonymous object, not to A.

There are reasons for doing assignment like this in Ada (or
at least I think so - I don't really know Ada), but the C++
assignment operator model is much cleaner.



  reply	other threads:[~2008-02-07  4:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07  1:19 Question about controlled types Peter C. Chapin
2008-02-07  4:54 ` Hyman Rosen [this message]
2008-02-07 16:30   ` Robert A Duff
2008-02-08  3:31     ` Peter C. Chapin
2008-02-08  3:47   ` Peter C. Chapin
2008-02-07 16:47 ` Adam Beneschan
2008-02-08  3:46   ` Peter C. Chapin
replies disabled

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