Can the new string literal prefix in C++11 be adaptive?
C++11 introduces new string literal prefixes: u8, u, U.
Sometimes my framework needs to change the default character type (by changing a typedef), for example in this program the type is wchar_t, then in another one it's char16_t. I find I have to change many code lines to give the string constants the correct prefix, otherwise it can not be compiled.
When the default character type is set to wchar_t, all the string constants with prefix u will fail to compile, or when the type is char16_t the string constants with L prefix will fail.
So my question is, can this prefix selection be adaptive? When the character type is set to char16_t I expect all the string constants automatically have the prefix u.
Any suggestions from you? Thanks.