diff options
Diffstat (limited to 'Examples/test-suite/errors/cpp_namespace_template_bad.i')
-rw-r--r-- | Examples/test-suite/errors/cpp_namespace_template_bad.i | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Examples/test-suite/errors/cpp_namespace_template_bad.i b/Examples/test-suite/errors/cpp_namespace_template_bad.i index f41918f8e..d8a33098e 100644 --- a/Examples/test-suite/errors/cpp_namespace_template_bad.i +++ b/Examples/test-suite/errors/cpp_namespace_template_bad.i @@ -9,6 +9,11 @@ namespace test { }; } +namespace test1 { + %template(maxchar) ::test::max<char>; + %template(vectorchar) ::test::vector<char>; +} + namespace test2 { using namespace test; %template(maxshort) max<short>; @@ -32,9 +37,18 @@ namespace test4 { %template(vectorInteger) vector<Integer>; } -using namespace test; namespace test5 { +// Empty namespace +} +template<typename T> struct GlobalVector { + void gook(T i) {} + void geeko(double d) {} + void geeky(int d) {} +}; +%template(GlobalVectorIntPtr) test5::GlobalVector<int *>; // should fail as GlobalVector is in global namespace + +using namespace test; +namespace test6 { %template(maxdouble) max<double>; %template(vectordouble) vector<double>; } - |