DMD 1.024 and 2.008 releases
Christopher Wright
dhasenan at gmail.com
Tue Dec 4 10:46:23 PST 2007
Okay, that all works, but only in a shallow manner. If you add the
following, it doesn't compile:
class Something : Bar!(int) {}
bool b = Foo!(Something);
A pity, that. No faking attributes yet.
Christopher Wright wrote:
> Walter, you snuck in a change to implicit template arguments, didn't you?
>
> The following works now but failed before:
> template Foo (U : Bar!(T), T) {
> pragma (msg, T.stringof);
> const bool Foo = false;
> }
>
> class Bar (T) {
> T value;
> }
>
> void main () {
> auto f = Foo!(Bar!(long));
> }
>
> Now I can fake C# attributes for classes using interfaces:
> interface IFoo : ImplementedBy!(Foo) {}
>
> Though it only works for types, so I can't do:
> class Bar : DbTable!("DatabaseTableForBar") {}
More information about the Digitalmars-d-announce
mailing list