Consider generalizing Bounded
Tomek Sowiński
just at ask.me
Tue Oct 12 23:32:36 PDT 2010
Jason House napisał:
> Tomek Sowiński Wrote:
>
>> It may sound ridiculous but this is what came to me in a dream last
>> night: why exactly does Bounded have to express an interval? Forget
>> intervals for a minute:
>>
>> struct Bounded(alias Pred, T);
>>
>> where Pred is a unary callable returning bool (same as in e.g. filter()).
> ...
>
> That reminds me of class invariants.
Yeah, only imposed from outside, not inside.
--
Tomek
More information about the Digitalmars-d
mailing list