File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1616
1717構文としては`u8"\N{LATIN CAPITAL LETTER A WITH MACRON}"`のように、`\N{…}`の波カッコで囲まれた中に、ユニバーサルキャラクタ名を入力する。
1818
19- 使用可能な文字はUnicode規格ISO/IEC 10646で定義される 。
19+ 使用可能な文字はUnicode規格ISO/IEC 10646で定義され、それと厳密に一致しなければならない(大文字と小文字の違いやスペースの有無・数などが厳密にチェックされる) 。
2020
21- 名前のマッチングは[UAX44-LM2](https://www.unicode.org/reports/tr44/tr44-24.html#UAX44-LM2)を参照しており、これによって
22-
23- - 大文字・小文字を区別しない
24- - ハイフンの省略
25- - アンダースコアをハイフンに置換
26-
27- するなど、柔軟な指定ができるようになっている。例として、以下の名前はすべて`U+200B` (ZERO WIDTH SPACE、ゼロ幅スペース) を表すものとして使用できる:
21+ このユニコード名のマッチングを規定する[UAX44-LM2](https://www.unicode.org/reports/tr44/tr44-24.html#UAX44-LM2)では、以下の名前はすべて`U+200B` (ZERO WIDTH SPACE、ゼロ幅スペース) を表すものとしてマッチングされるが、C++の名前付きユニバーサルキャラクタ名では一番最初の`ZERO WIDTH SPACE`のみが正しい名前として受け入れられる。
2822
2923```
3024ZERO WIDTH SPACE
@@ -33,7 +27,6 @@ zero-width space
3327ZERO width S P_A_C E
3428```
3529
36-
3730## 例
3831```cpp example
3932#include <iostream>
@@ -61,6 +54,6 @@ int main()
6154- [C++11 `char16_t`と`char32_t`](/lang/cpp11/char16_32.md)
6255
6356## 参照
64- - [P2173R1 Attributes on Lambda-Expressions ](https://www.open-std.org/jtc1/sc22/wg21 /docs/papers/2021/p2173r1.pdf )
57+ - [P2071R2 Named universal character escapes ](https://www.open-std.org/JTC1/SC22/WG21 /docs/papers/2022/p2071r2.html )
6558- [Unicode Character “Ā” (U+0100)](https://www.compart.com/en/unicode/U+0100)
66- - [Unicode Character “◌̀” (U+0300)](https://www.compart.com/en/unicode/U+0300)
59+ - [Unicode Character “◌̀” (U+0300)](https://www.compart.com/en/unicode/U+0300)
You can’t perform that action at this time.
0 commit comments