Range Construction Pattern

Philippe Sigaud philippe.sigaud at gmail.com
Sat Feb 22 06:29:28 PST 2014


> You can check if arbitrary code compiles with the
"if-typeof-delegate-trick":
> --
> static if(is(typeof({ <code>}))))
> {
> // code compiles
> }
> --

Or with __traits(compiles, <code>), which better documents the intent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140222/434f808f/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list