What is use of universal character names in identifiers in C++11

Posted by Jan Hudec on Programmers See other posts from Programmers or by Jan Hudec
Published on 2012-09-25T14:45:58Z Indexed on 2012/09/25 15:49 UTC
Read the original article Hit count: 236

Filed under:

The new C++ standard specifies universal character names, written as \uNNNN and \UNNNNNNNN and representing the characters with unicode codepoints NNNN/NNNNNNNN. This is useful with string literals, especially since explicitly UTF-8, UTF-16 and UCS-4 string literals are also defined. However, the universal character literals are also allowed in identifiers. What is the motivation behind that?

The syntax is obviously totally unreadable, the identifiers may be mangled for the linker and it's not like there was any standard function to retrieve symbols by name anyway. So why would anybody actually use an identifier with universal character literals in it?

© Programmers or respective owner

Related posts about c++11