From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: A few questions Date: Tue, 17 Nov 2015 23:14:17 +0000 Organization: A noiseless patient Spider Message-ID: References: <5007b311-5d2e-448c-b8c8-fc2e2d88ea5e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="29a2b57997615acde1fccc73c72adb9b"; logging-data="24068"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zGeTJI4xnqlgiPu/gDL+nXqqudnrffTg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:RUCIs8nQ/yvIjUUvMHRpLQH/yUQ= sha1:aEfy3U87c2jyrckQBgbjOxSYivQ= Xref: news.eternal-september.org comp.lang.ada:28430 Date: 2015-11-17T23:14:17+00:00 List-Id: "Randy Brukardt" writes: > "Simon Wright" wrote in message > news:ly1tbpipgd.fsf@pushface.org... >> I can't of course speak for AdaCore, but I think that the problem is >> to do with obtaining a writable view of an in parameter; for example, in >> the Bounded Hashed Map (GCC 5) there is >> >> function Iterate >> (Container : Map) return >> Map_Iterator_Interfaces.Forward_Iterator'Class >> is >> B : Natural renames Container'Unrestricted_Access.all.Busy; > As Brad noted, you have to use the Rosen technique here. Not hacks > like 'Unrestricted_Access. (The Rosen technique is not a "trick", it's > an intended part of the language in Ada 2012. I admit it originally > was accidental, but it's too widely used to eliminate.) Does that now work for non-limited types? The anti-tampering bits have to be in the container ... how have other vendors managed this? Brad was talking about using this technique in the iterator.