On Monday, 17 December 2012 at 14:18:25 UTC, David Nadlinger wrote:
On Monday, 17 December 2012 at 14:15:42 UTC, Pavel wrote:
It seems to me handier to use it from templates manipulating code as strings than usage of __traits(compiles,...) directly.

I'm not quite sure how this is nicer to use than »enum foo = __traits(compiles, { mixin(bar); });«, but tastes differ…

Yup, it is only IMHO :) Useful for forgetful people as me: because without the utility template it is easy to forget to use 'mixin' and to put the statements in the block.




Reply via email to