Possible bug in RVO?

Anonymouse via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 4 09:36:58 PDT 2016


On Monday, 4 April 2016 at 03:55:26 UTC, Yuxuan Shui wrote:
> On Monday, 4 April 2016 at 03:28:01 UTC, Yuxuan Shui wrote:
> auto clobber(ref Set x, ref Set o) {
> 	Set ret;
> 	ret.aa = x.aa;
  	  assert(x.aa.length > 0);  // <-- boom
> 	return ret;
> }

No idea myself but that's where it seems to go wrong.


More information about the Digitalmars-d-learn mailing list