Aliasing a mixin (or alternative ways to profile a scope)

Adam D. Ruppe destructionator at gmail.com
Thu Mar 7 20:20:07 UTC 2019


On Thursday, 7 March 2019 at 20:07:27 UTC, Simon wrote:
> measure("func1");
> scope(exit) measure("func1");

I would suggest just using a struct. Make its constructor do the 
first measure, and its destructor do the second measure.

I betcha you can avoid mixin entirely.


More information about the Digitalmars-d-learn mailing list