[typing] Type-erasure re generics
Steven Schveighoffer
schveiguy at yahoo.com
Wed Sep 29 12:39:00 PDT 2010
On Wed, 29 Sep 2010 15:36:02 -0400, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> On Wed, 29 Sep 2010 15:16:28 -0400, Jonathan M Davis
>>
>> But worse still, consider this: With templates, you could have a
>> container type
>> which used completely different implementations depending on the
>> type(s) you use
>> to instantiate it.
>
> Excellent point. If this *were* a feature we wanted, the compiler would
> have to make that determination (I think it could be done, but I'm not
> sure of all the nuances).
By "that determination" I meant, determine if the template alters its
implementation based on the type passed in.
-Steve
More information about the Digitalmars-d
mailing list