PageRenderTime 18ms CodeModel.GetById 16ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/template_default_inherit.i

#
Swig | 25 lines | 18 code | 7 blank | 0 comment | 0 complexity | 6e30178e8c9673812b0101c331047753 MD5 | raw file
 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