Jonathan M Davis wrote:
> On Sunday, November 28, 2010 04:43:47 Jérôme M. Berger wrote:
>> ==============================8<------------------------------
>> concept FooBar(U)
>> {
>> int foo (int);
>> bool bar (U);
>> }
>>
>> template Test(T, U) if (is!(FooBar!U, T)) ...
>> ------------------------------>8==============================
>>
>> This already works with class and interface templates...
>
> That may work. I was thinking of a verifying against a concrete interface -
> which _wouldn't_ work with templates. I probably didn't think of this because
> mixing templates and interfaces or classes is generally a bad idea in D,
> because
> template functions can't be virtual.
>
That is why I used the word "concept" instead of "interface". What
I describe here has *nothing* to do with interfaces as they
currently exist in D (although a library solution could be done
using interfaces if nothing else is done).
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
