Added initial support for variadic templates.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11458 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matevz Jekovec 2009-07-27 19:07:38 +00:00
commit 85ae38ccee
3 changed files with 18 additions and 1 deletions

View file

@ -408,7 +408,8 @@ CPP0X_TEST_CASES = \
cpp0x_uniform_initialization \
cpp0x_function_objects \
cpp0x_strongly_typed_enumerations \
cpp0x_rvalue_reference
cpp0x_rvalue_reference \
cpp0x_variadic_templates
# cpp0x_alternate_function_syntax # not fully implemented yet
# cpp0x_hash_types # not fully implemented yet
# cpp0x_unrestricted_unions # not supported by any compilers yet

View file

@ -0,0 +1,8 @@
%module cpp0x_variadic_templates
%inline %{
template<typename... Values>
class tuple {
};
%}

View file

@ -5808,6 +5808,14 @@ templcpptype : CLASS {
$$ = (char *)"typename";
if (!inherit_list) last_cpptype = $$;
}
| CLASS PERIOD PERIOD PERIOD {
$$ = (char*)"class";
if (!inherit_list) last_cpptype = $$;
}
| TYPENAME PERIOD PERIOD PERIOD {
$$ = (char *)"typename";
if (!inherit_list) last_cpptype = $$;
}
;
cpptype : templcpptype {