diff options
Diffstat (limited to 'Examples/test-suite/template_default_inherit.i')
| -rw-r--r-- | Examples/test-suite/template_default_inherit.i | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Examples/test-suite/template_default_inherit.i b/Examples/test-suite/template_default_inherit.i new file mode 100644 index 0000000..d8d34d8 --- /dev/null +++ b/Examples/test-suite/template_default_inherit.i @@ -0,0 +1,25 @@ +%module template_default_inherit + +%warnfilter(SWIGWARN_RUBY_WRONG_NAME) A::nindex; /* Ruby, wrong constant name */ + +%inline %{ + template <class C> + struct A + { + typedef unsigned int size_type; + static const size_type nindex = static_cast<size_type>(-1); + + }; + + template <class C> + struct B : A<C> + { + typedef typename A<C>::size_type size_type; + void say_hi(size_type index = A<C>::nindex) {} + }; + +%} + +%template(A_int) A<int>; +%template(B_int) B<int>; + |
