In your case I would guess with -O -release -inline it would generate
assambly with same (similar) speed.
But in this case it would be different:
mixin template Test()
{
int returnInit() { return int.init; }
}
int returnInitImpl() { return int.init; }
class A
{
mixin Test!(); // add
On Monday, 22 February 2016 at 13:56:19 UTC, anonymous wrote:
On Monday, 22 February 2016 at 13:35:10 UTC, Andrea Fontana
wrote:
Check this code:
http://dpaste.dzfl.pl/fcf876acbbdc
Structs A and B do the same things, in different way.
Is there any difference/limitation between those?
Andrea
On Monday, 22 February 2016 at 13:35:10 UTC, Andrea Fontana wrote:
Check this code:
http://dpaste.dzfl.pl/fcf876acbbdc
Structs A and B do the same things, in different way.
Is there any difference/limitation between those?
Andrea
The mixin variant generates a method. That means, you can
ref
Check this code:
http://dpaste.dzfl.pl/fcf876acbbdc
Structs A and B do the same things, in different way.
Is there any difference/limitation between those?
Andrea