On Friday, 9 February 2018 at 21:31:29 UTC, ShadoLight wrote:
There's missing quotes in there:
code ~= "push(call!"~piece~"(pop(), pop()));\n";
code ~= "push(call!\""~piece~"\"(pop(), pop()));\n";
That might have been an error in the original book. A lot of
quotes and semicolons got mangled in the process of copying them
from the actual compilable examples into the MS Word manuscript..
But to explain why this is wrong just consider the code generated:
When the operator is pasted in without quotes, you get the above.
And + isn't a valid template arg. But "+" is.