Composing features at compile time

Philippe Sigaud philippe.sigaud at gmail.com
Sun Nov 24 12:14:15 PST 2013


>Unfortunately this looks like it works best when providing fairly separate features
> that doesn't interact with each other or the main functionality.

If features are coupled, I see no easy way out.


> http://pastebin.com/XYGtTarn
>
> Lines 19-25, 34-37 and 42 are only needed if pointers are supported.
> Lines 27-30 are only needed if references are supported.
>
> There are already both a couple of static-ifs and regular ifs. Adding even
> more static-ifs will make the code a bigger mess than it already is.


If references are not supported, you want the else clause all by
itself? (lignes 34-43)


More information about the Digitalmars-d-learn mailing list