
29 Apr
2011
29 Apr
'11
6:37 p.m.
On 27/04/11 23:11, Mathias Gaunard wrote: <snip>
If that runtime conversion is a concern, it's also possible to do that at compile time, at least with C++0x (syntax is ugly in C++03).
Do you imagine that user-defined literals allow this? Sorry, but they don't, according to my reading of n3290 [lex.ext]. Only user defined integer and floating point literals allow compile-time access to the characters. Unless you're willing to write all strings in [0-9a-fA-F] (in which case you'd certainly be happy with ASCII!) this doesn't help much. If there's some other way to get compile-time access to characters more neatly than in C++03, then please share it; I would like to know! John Bytheway