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:
parent
3e0fc9f7b9
commit
2b4b1cc157
4 changed files with 144 additions and 4 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
26
Examples/test-suite/template_double_brackets.i
Normal file
26
Examples/test-suite/template_double_brackets.i
Normal 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);
|
||||
};
|
||||
|
||||
26
Examples/test-suite/template_double_brackets_broke.i
Normal file
26
Examples/test-suite/template_double_brackets_broke.i
Normal 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);
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue