User defined literals: fix for %rename and update docs

This commit is contained in:
William S Fulton 2013-02-05 23:08:08 +00:00
commit c1b99d4279
3 changed files with 53 additions and 5 deletions

View file

@ -5677,10 +5677,11 @@ direct_declarator : idcolon {
}
}
/* User-defined string literals. eg.
int operator""_mySuffix(const char* val, int length) {...} */
int operator"" _mySuffix(const char* val, int length) {...} */
/* This produces one S/R conflict. */
| OPERATOR ID LPAREN parms RPAREN {
SwigType *t;
Append($1, " "); /* intervening space is mandatory */
Append($1, Char($2));
$$.id = Char($1);
t = NewStringEmpty();