static unittest

Meta via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 14:34:22 PDT 2014


On Wednesday, 30 April 2014 at 21:04:19 UTC, Walter Bright wrote:
> On 4/30/2014 1:38 PM, Meta wrote:
>> Also, while we're thinking about static unittest, what about 
>> contracts? I've
>> seen Bearophile suggest it quite a few times, and I agree that 
>> it'd be very
>> useful to have contracts that are able to check a subset of 
>> function
>> contracts/object invariants at compile time.
>
> Already have them - template constraints.

Your function needs to be a template for that. Also, object 
invariants.


More information about the Digitalmars-d mailing list