memoize
bearophile
bearophileHUGS at lycos.com
Tue Jan 4 06:27:44 PST 2011
Andrei:
> Often you want to say "this entity is pure/const/immutable/safe... if
> this other entity is the same, or generally if this Boolean is true". So
> I was thinking of introducing e.g. a constrained pure:
>
> template memoize( alias fn ) {
> pure(isPure!fn) auto memoize( ParameterTypeTuple!fn ) {
> ...
> }
> }
http://d.puremagic.com/issues/show_bug.cgi?id=5125
Bye,
bearophile
More information about the Digitalmars-d
mailing list