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: Mon, 02 Nov 2015 18:48:15 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="2d7699570724a9a82a760842267e2c56"; logging-data="13335"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ISanxXUjGaFUsBA3hITCE2qbwftoVjDQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:8IjnP2znztffrlIUqHEAgPOT0fg= sha1:MJOPDg0r/GucvsdkTav9pLtoBaA= Xref: news.eternal-september.org comp.lang.ada:28180 Date: 2015-11-02T18:48:15+00:00 List-Id: Simon Wright writes: > I'd have liked to support > > for D in Period loop Oops, I meant "for D of Period", i.e. for D : Ada.Calendar.Time of Period loop ... but you'd need function Constant_Reference (Container : aliased Date_Container; Position : Cursor) return Constant_Reference_Type; returning type Constant_Reference_Type (Element : not null access constant Ada.Calendar.Time) is private with Implicit_Dereference => Element; which is clearly meant for actual containers and here would require - I think - allocating an Ada.Calendar.Time, and of course freeing it eventually. Shame, it makes it tricky to support lazy evaluation. But perhaps we shouldn't want to ...