Added support for template double brackets for C++0x.

Added test cases.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11245 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matevz Jekovec 2009-06-04 23:25:39 +00:00
commit 2b4b1cc157
4 changed files with 144 additions and 4 deletions

View file

@ -82,6 +82,7 @@ CPP_TEST_BROKEN += \
nested_struct \
overload_complicated \
template_default_pointer \
template_double_brackets_broke \
template_expr
@ -311,6 +312,7 @@ CPP_TEST_CASES += \
template_default_inherit \
template_default_qualify \
template_default_vw \
template_double_brackets \
template_enum \
template_enum_ns_inherit \
template_enum_typedef \

View file

@ -0,0 +1,26 @@
%module foo
#include <map>
std::map<int,std::map<int, double>> m;
std::map<int,std::map<int, double> > n;
std::map< std::map<(6>>1), double>, double> o;
//std::map< std::map<6>>1, double>, double> p; // fails as it should
class ABC {
public:
int a;
int operator>>(ABC &);
int operator<<(ABC &);
};
template<class T>
class ABC2 {
public:
int a;
template<typename U>
int operator>>(ABC &, U);
template<typename U>
int operator<<(ABC &, U);
};

View file

@ -0,0 +1,26 @@
%module foo
#include <map>
std::map<int,std::map<int, double>> m;
std::map<int,std::map<int, double> > n;
std::map< std::map<(6>>1), double>, double> o;
std::map< std::map<6>>1, double>, double> p; // fails as it should
class ABC {
public:
int a;
int operator>>(ABC &);
int operator<<(ABC &);
};
template<class T>
class ABC2 {
public:
int a;
template<typename U>
int operator>>(ABC &, U);
template<typename U>
int operator<<(ABC &, U);
};