Added support for unicode strings and fixed support for wstrings.
Added test case cpp0x_raw_string_literals.i. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11327 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4946748164
commit
0f2786aa54
3 changed files with 92 additions and 14 deletions
30
Examples/test-suite/cpp0x_raw_string_literals.i
Normal file
30
Examples/test-suite/cpp0x_raw_string_literals.i
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* This module tests whether Swig correctly parses:
|
||||
- ordinary strings (char_t)
|
||||
- L wide strings (wchar_t)
|
||||
- u8 unicode8 strings (char_t)
|
||||
- u unicode16 strings (char16_t)
|
||||
- U unicode32 strings (char32_t)
|
||||
|
||||
This module also tests whether Swig correctly parses custom string delimiters.
|
||||
*/
|
||||
|
||||
%module raw_string_literals
|
||||
|
||||
%inline %{
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
string a="ABC";
|
||||
wstring wide=L"ABC";
|
||||
string c=u8"ABC";
|
||||
string b=u"ABC";
|
||||
string d=U"ABC";
|
||||
|
||||
/*string e=R"XXX[ABC"blah]XXX";
|
||||
string g=u8R"XXX[ABC"blah]XXX";
|
||||
string f=uR"XXX[ABC"blah]XXX";
|
||||
string h=UR"XXX[ABC"blah]XXX";
|
||||
*/
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue