1 // bindgen-flags: --enable-cxx-namespaces --module-raw-line root::whatever 'pub type whatever_other_thing_t = whatever_int_t;' 2 3 void top_level(); 4 5 namespace whatever { 6 typedef int whatever_int_t; 7 8 void in_whatever(); 9 } 10 11 namespace { 12 namespace empty {} 13 14 struct A { 15 whatever::whatever_int_t b; 16 }; 17 } 18 19 template<typename T> 20 class C: public A { 21 T m_c; 22 T* m_c_ptr; 23 T m_c_arr[10]; 24 }; 25 26 template<> 27 class C<int>; 28 29 namespace w { 30 typedef unsigned int whatever_int_t; 31 32 template<typename T> 33 class D { 34 C<T> m_c; 35 }; 36 37 whatever_int_t heh(); // this should return w::whatever_int_t, and not whatever::whatever_int_t 38 39 C<int> foo(); 40 41 C<float> barr(); // <- This is the problematic one 42 } 43 44 #define NAMESPACE foobar 45 namespace NAMESPACE { 46 void foo(); 47 } 48 49 #include "namespace/nsbegin.h" 50 void bar(); 51 #include "namespace/nsend.h" 52