Merge branch 'liorgold-alias-template'
* liorgold-alias-template: Warning header cosmetics Fix decl attribute in C++11 alias templates Add C++11 alias templates
This commit is contained in:
commit
c74397bfd0
7 changed files with 132 additions and 61 deletions
|
|
@ -2901,25 +2901,24 @@ c_declaration : c_decl {
|
|||
| USING idcolon EQUAL type plain_declarator SEMI {
|
||||
/* Convert using statement to a typedef statement */
|
||||
$$ = new_node("cdecl");
|
||||
SwigType_push($4,$5.type);
|
||||
Setattr($$,"type",$4);
|
||||
Setattr($$,"storage","typedef");
|
||||
Setattr($$,"name",$2);
|
||||
Setattr($$,"decl","");
|
||||
Setattr($$,"decl",$5.type);
|
||||
SetFlag($$,"typealias");
|
||||
add_symbols($$);
|
||||
}
|
||||
| TEMPLATE LESSTHAN template_parms GREATERTHAN USING idcolon EQUAL type plain_declarator SEMI {
|
||||
$$ = new_node("using");
|
||||
/* Convert alias template to a "template" typedef statement */
|
||||
$$ = new_node("template");
|
||||
Setattr($$,"type",$8);
|
||||
Setattr($$,"storage","typedef");
|
||||
Setattr($$,"name",$6);
|
||||
SwigType_push($8,$9.type);
|
||||
Setattr($$,"uname",$8);
|
||||
Setattr($$,"decl",$9.type);
|
||||
Setattr($$,"templateparms",$3);
|
||||
Setattr($$,"templatetype","cdecl");
|
||||
SetFlag($$,"aliastemplate");
|
||||
add_symbols($$);
|
||||
SWIG_WARN_NODE_BEGIN($$);
|
||||
Swig_warning(WARN_CPP11_ALIAS_TEMPLATE, cparse_file, cparse_line, "The 'using' keyword in template aliasing is not fully supported yet.\n");
|
||||
SWIG_WARN_NODE_END($$);
|
||||
|
||||
$$ = 0; /* TODO - ignored for now */
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue