On 10/24/2011 10:53 AM, Ed Smith-Rowland wrote:
Concerning this error, the only way to get here is to mis-use a raw
literal operator by giving it a quoted string. The prefix must be
interpretable as a number of some kind. I think I'll tell the user to
drop the quotes.

It seems more likely to me that the user intends to make a string literal, and just doesn't understand that an operator with a single const char * parameter is a raw literal operator which is unsuitable for a string literal.

Incidentally, in a string literal, the prefix is an initial u8R or whatever; the "Boo!" is not a prefix, though there doesn't seem to be a good term to use for it.

For both the raw literal and the literal template I use num_string which
ultimately comes from build_string in tree.c line 1531.
It looks like this function null terminates the buffer - i.e. the length
is len + 1. Yet when I have two user-defined literals in sequence the
first sees both strings concatenated.

Did you figure out what was causing this? It looks like your latest patch tries to avoid this by modifying the string in the token, which I don't think we want to do.

It certainly seems to me that as you said, build_string should null-terminate the string itself.

Jason

Reply via email to