Static inheritance (proof of concept)

Iakh via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 1 11:12:53 PST 2016


On Monday, 29 February 2016 at 13:31:11 UTC, Atila Neves wrote:
> http://forum.dlang.org/post/tgnxocozkurfvmxqofnn@forum.dlang.org
>
> Atila

If you about this:
http://forum.dlang.org/post/eejiauievypbfifkyvvo@forum.dlang.org

>On Wednesday, 29 July 2015 at 06:05:37 UTC, Kagamin wrote:
>> On Tuesday, 28 July 2015 at 13:10:43 UTC, Atila Neves wrote:
>>> I guess, but not easily. I've written template mixins to do 
>>> that before and it was awkward.
>>
>> What was awkward?
>
>Writing a generic solution that would work for multiple 
>constraints without code repetition.
>
>Atila

It could be done without type name repetition:

mixin checkConcept!isInputRange;
mixin checkConcept!(isOutputRange!(PlaceHolderForThisT, int));

Last one is even more general. It could handle checkers with odd 
order of parameters.


More information about the Digitalmars-d mailing list