what is going on with cgcs.c:351?

Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 14 21:53:09 PDT 2014


Update and clarification:

this triggers the error:
flight_info.add (Plot (ts.zip (vs), gfx, txt)
	.color (blue*white)
	.title (`velocity`)
	, square (0.15)
);

this compiles:
flight_info.add (Plot (ts.zip (vs), gfx, txt), square (0.15));

this also compiles:
auto plot = Plot (ts.zip (vs), gfx, txt);
flight_info.add (plot
	.color (blue*white)
	, square (0.15)
);

but this will not:
auto plot = Plot (ts.zip (vs), gfx, txt);
flight_info.add (plot
	.color (blue*white)
	.title (`velocity`)
	, square (0.15)
);

For clarification, the Plot constructor (and all of its 
option-setting functions) return a copy of the Plot with the new 
option set. It looks like when I pass it through more than one 
layer of "return this" inside of the function arguments for 
flight_info.add, it triggers the backend/cgcs.c assertion.


More information about the Digitalmars-d-learn mailing list