1 %module template_ns_scope 2 // Tests a scoping bug reported by Marcelo Matus. 3 4 %inline %{ 5 namespace hi { 6 enum Hello { Hi, Hola }; 7 8 template <Hello h> 9 struct A 10 { 11 public: AA12 A() {} // *** Here, the const. breaks swig *** 13 // *** swig works without it *** 14 }; 15 16 namespace hello 17 { 18 template <Hello H> 19 struct B : A<H> 20 { say_hiB21 int say_hi() { return 0; } 22 }; 23 } 24 } 25 26 %} 27 namespace hi 28 { 29 %template(A_Hi) A<Hi>; 30 namespace hello 31 { 32 %template(B_Hi) B<Hi>; 33 } 34 } 35 36 37 38 39