PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Swig | 32 lines | 25 code | 7 blank | 0 comment | 0 complexity | 6cdc18e30032dccaa270f9828ee216cb MD5 | raw file
 1%module template_retvalue
 2%inline %{
 3 
 4  enum Hello
 5    {
 6      Hi, Hola
 7    };
 8 
 9  struct C
10  {
11      C(int) {}
12  };
13 
14  template <Hello>
15    class A
16    {
17    public:
18      A(int) {}
19    };
20 
21 
22  template <Hello h>
23    struct B
24    {
25      C get_c() { return C(0); }               // this works
26      A<h> get_a() { return A<h>(0); }         // this doesn't
27    };
28 
29  %}
30 
31%template(A_Hi) A<Hi>;
32%template(B_Hola) B<Hola>;