17 Jan
2008
17 Jan
'08
12:38 p.m.
Pavol Droba wrote:
Since as_literal is used quite some time already, I don't see any compelling reason to rename it. I agree as_literal can't be renamed. Now we have to look for a new name? `SIZE(as_???("ab\0c")) == 4`
as_??? returns in constant time. I don't find the name yet. :-)
I'm not sure if this case is important enough to get special as_XXX threatment.
IMHO if you need nulls inside a string, you should use std::string or just a plain array. literal with null is dangerous at least.
\0 is not so important in this case.
iterator_range