parent
b00ee788a2
commit
e4759ae250
2 changed files with 18 additions and 0 deletions
8
Examples/test-suite/cpp17_u8_char_literals.i
Normal file
8
Examples/test-suite/cpp17_u8_char_literals.i
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%module cpp17_u8_char_literals
|
||||
|
||||
%inline %{
|
||||
// UTF-8 character literals will (apparently) have type char8_t in C++20.
|
||||
char a = u8'a';
|
||||
char u = u8'u';
|
||||
char u8 = u8'8';
|
||||
%}
|
||||
10
Examples/test-suite/python/cpp17_u8_char_literals_runme.py
Normal file
10
Examples/test-suite/python/cpp17_u8_char_literals_runme.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from cpp17_u8_char_literals import *
|
||||
|
||||
if cvar.a != 'a':
|
||||
raise RuntimeError
|
||||
|
||||
if cvar.u != 'u':
|
||||
raise RuntimeError
|
||||
|
||||
if cvar.u8 != '8':
|
||||
raise RuntimeError
|
||||
Loading…
Add table
Add a link
Reference in a new issue