1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// bindgen-flags: --enable-cxx-namespaces --allowlist-type StaticRefPtr --opaque-type 'JS::Rooted' -- -std=c++14 namespace JS { template <typename T> class Rooted { using ElementType = T; }; } class c { JS::Rooted<int> b; }; class B { c a; }; template <class> class StaticRefPtr {}; struct { StaticRefPtr<B> d; } e;