From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Allocators for anonymous access return types
Date: Sun, 31 Oct 2010 15:10:15 +0100
Date: 2010-10-31T15:10:15+01:00 [thread overview]
Message-ID: <iajtcf$1qc$1@news.eternal-september.org> (raw)
In-Reply-To: <87d3qq1ont.fsf@mid.deneb.enyo.de>
Le 31/10/2010 14:23, Florian Weimer a �crit :
>> Conclusion: don't use them, especially with allocators. Use named
>> types as much as possible.
>
> I'm trying to write type-safe variadic function which does not heavily
> use the free store.
>
> With anonymous access types, it could look like this:
>
> package Variadic is
>
> type Variadic is tagged limited private;
My first reaction would be to define here:
type Variadic access is access Variadic;
But you mention:
> (My other example avoids copying, and seems to be safe according to
> the ARM rules, as long as you don't declare something involving the
> Unchecked_* types. A solution based on anonymous access types might
> make this violation impossible, hence my interest in them.)
I don't know what you mean by Unchecked_* types. I guess you mean no use
of Unchecked_Conversion? Better use a restriction then.
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Adalog a d�m�nag� / Adalog has moved:
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
next prev parent reply other threads:[~2010-10-31 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-31 12:18 Allocators for anonymous access return types Florian Weimer
2010-10-31 12:46 ` J-P. Rosen
2010-10-31 13:23 ` Florian Weimer
2010-10-31 14:10 ` J-P. Rosen [this message]
2010-10-31 14:28 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox