/tags/rel-1.3.35/Examples/test-suite/extend_template_ns.i
Swig | 32 lines | 9 code | 1 blank | 22 comment | 0 complexity | 8538d803fe1befdc7d384e595b57953f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- %module extend_template_ns
- %inline %{
- namespace oss
- {
- enum Test {One, Two};
- }
- %}
-
- namespace oss {
- %extend Foo<One> { //************ this doesn't work
- int test1(int x) { return x; }
- };
- }
-
- %extend oss::Foo<oss::One> { //******** this works
- int test2(int x) { return x; }
- };
-
- %inline %{
- namespace oss
- {
- template <Test>
- struct Foo {
- };
- }
- %}
-
- namespace oss
- {
- %template(Foo_One) Foo<One>;
- }
-