add in more raw string literals for gcc-4.5
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12151 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d52ef31911
commit
da182a09f5
1 changed files with 37 additions and 17 deletions
|
|
@ -8,8 +8,14 @@
|
||||||
This module also tests whether Swig correctly parses custom string delimiters.
|
This module also tests whether Swig correctly parses custom string delimiters.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_raw_string_literals
|
%module cpp0x_raw_string_literals
|
||||||
%warnfilter(454) c;
|
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) aa;
|
||||||
%warnfilter(454) d;
|
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) bb;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) ee;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) ff;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) cc;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) dd;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) gg;
|
||||||
|
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) hh;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
@ -20,25 +26,39 @@ using namespace std;
|
||||||
int L = 100;
|
int L = 100;
|
||||||
int u8 = 100;
|
int u8 = 100;
|
||||||
int u = 100;
|
int u = 100;
|
||||||
int U = 100;
|
struct UStruct {
|
||||||
|
static const int U = 100;
|
||||||
|
};
|
||||||
|
|
||||||
int R = 100;
|
int R = 100;
|
||||||
int LR = 100;
|
int LR = 100;
|
||||||
int u8R = 100;
|
int u8R = 100;
|
||||||
int uR = 100;
|
int uR = 100;
|
||||||
int UR = 100;
|
struct URStruct {
|
||||||
|
static const int UR = 100;
|
||||||
|
};
|
||||||
|
|
||||||
char *a = "ABC";
|
const char *aa = "ABC";
|
||||||
wstring wide = L"ABC";
|
wstring wide = L"ABC";
|
||||||
//char *b = u8"ABC"; // not supported by GCC
|
const char *bb = u8"ABC";
|
||||||
char16_t *c = u"ABC";
|
const char16_t *cc = u"ABC";
|
||||||
char32_t *d = U"ABC";
|
const char32_t *dd = U"ABC";
|
||||||
|
|
||||||
/* Raw string literals are not supported by GCC yet */
|
|
||||||
/*char *e = R"XXX[to be or "not" to be [these are parenthesis], this is the question!]XXX";
|
|
||||||
wstring wide2 = LR"XXX[to be or "not" to be [these are parenthesis], this is the question!]XXX";
|
|
||||||
char *f = u8R"XXX[to be or "not" to be [these are parenthesis], this is the question!]XXX";
|
|
||||||
char16_t *g = uR"XXX[to be or "not" to be [these are parenthesis], this is the question!]XXX";
|
|
||||||
char32_t *h = UR"XXX[to be or "not" to be [these are parenthesis], this is the question!]XXX";
|
|
||||||
*/
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
/* Raw string literals */
|
||||||
|
|
||||||
|
#warning TODO: change SWIG support from old R"[ ... ]" to new R"( ... )"
|
||||||
|
|
||||||
|
const char *ee = R"XXX[to be or "not" to be [square parenthesis] (round parenthesis), that is the question!]XXX";
|
||||||
|
wstring wide2 = LR"XXX[to be or "not" to be [square parenthesis] (round parenthesis), that is the question!]XXX";
|
||||||
|
const char *ff = u8R"XXX[to be or "not" to be [square parenthesis] (round parenthesis), that is the question!]XXX";
|
||||||
|
const char16_t *gg = uR"XXX[to be or "not" to be [square parenthesis] (round parenthesis), that is the question!]XXX";
|
||||||
|
const char32_t *hh = UR"XXX[to be or "not" to be [square parenthesis] (round parenthesis), that is the question!]XXX";
|
||||||
|
%{
|
||||||
|
const char *ee = R"XXX(to be or "not" to be [square parenthesis] (round parenthesis), that is the question!)XXX";
|
||||||
|
wstring wide2 = LR"XXX(to be or "not" to be [square parenthesis] (round parenthesis), that is the question!)XXX";
|
||||||
|
const char *ff = u8R"XXX(to be or "not" to be [square parenthesis] (round parenthesis), that is the question!)XXX";
|
||||||
|
const char16_t *gg = uR"XXX(to be or "not" to be [square parenthesis] (round parenthesis), that is the question!)XXX";
|
||||||
|
const char32_t *hh = UR"XXX(to be or "not" to be [square parenthesis] (round parenthesis), that is the question!)XXX";
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue