diff --git a/Examples/test-suite/cpp11_template_typedefs.i b/Examples/test-suite/cpp11_template_typedefs.i index ea46706a9..d6a1a3c85 100644 --- a/Examples/test-suite/cpp11_template_typedefs.i +++ b/Examples/test-suite/cpp11_template_typedefs.i @@ -2,6 +2,7 @@ %module cpp11_template_typedefs %warnfilter(SWIGWARN_CPP11_ALIAS_TEMPLATE) TypedefName; +%warnfilter(SWIGWARN_CPP11_ALIAS_TEMPLATE) MyIntKeyClass; %warnfilter(SWIGWARN_CPP11_ALIAS_DECLARATION) PF; %inline %{ @@ -19,5 +20,13 @@ using TypedefName = SomeType; // type aliasing typedef void (*PFD)(double); // Old style using PF = void (*)(double); // New introduced syntax + + +// use of template aliasing +template +class MyCPP11Class { +}; +template using MyIntKeyClass = MyCPP11Class; +MyIntKeyClass intchar; %} diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index caac88e4d..1606dc249 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -3208,16 +3208,15 @@ c_declaration : c_decl { $$ = 0; /* TODO - ignored for now */ } - | TEMPLATE LESSTHAN template_parms GREATERTHAN USING idcolon EQUAL { + | TEMPLATE LESSTHAN template_parms GREATERTHAN USING idcolon EQUAL ID { skip_decl(); $$ = new_node("using"); + Setattr($$,"uname",$8); Setattr($$,"name",$6); 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 */ } ;