import source from 1.3.40
[external/swig.git] / Examples / test-suite / template_default_inherit.i
1 %module template_default_inherit
2
3 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) A::nindex;        /* Ruby, wrong constant name */
4  
5 %inline %{
6   template <class C>
7     struct A
8     {
9       typedef unsigned int size_type;
10       static const size_type nindex = static_cast<size_type>(-1);
11  
12     };
13  
14     template <class C>
15     struct B : A<C>
16     {
17       typedef typename A<C>::size_type size_type;
18       void say_hi(size_type index = A<C>::nindex) {}
19     };
20  
21 %}
22  
23 %template(A_int) A<int>;
24 %template(B_int) B<int>;                
25