On Fri, 20 Feb 2015 22:51:21 +0000, Vlad Levenfeld wrote:

> On Friday, 20 February 2015 at 22:44:35 UTC, ketmar wrote:
>> can you go with `relationImpl` and mixin/template that generates
>> `relation` with contract then? something like:
>>
>>   @reflexive @transitive bool relationImpl (T)(T a, T b) { ... }
>>   alias relation = buildWithContracts!relationImpl;
>>
>> then you can simply call `relationImpl` in your out section.
> 
> Yeah, this looks pretty good. As much as I hate the pimpl idiom,
> having a one-liner alias right next to the definition should minimize
> the eye-bleeding. Thanks!

and you can have an alias even before definition! ;-) this way it will 
not lost.

Attachment: signature.asc
Description: PGP signature

Reply via email to