Closed dbankieris closed 2 months ago
Also fails if the definition of Bar
is outside of the a
namespace, although for a different reason.
template <class T>
class Bar {};
namespace a {
class Foo {
public:
Bar<int> bar;
};
}
Compiling yields Foo_py.i:26: Error: 'Bar' resolves to '::Bar' and was incorrectly instantiated in scope 'a' instead of within scope ''.
This is due to %template
being placed in the wrong namespace.
template <class T>
class Bar {};
#ifndef TRICK_SWIG_TEMPLATE_a__Foo_bar
#define TRICK_SWIG_TEMPLATE_a__Foo_bar
namespace a {
%template(a__Foo_bar) Bar<int>;
}
#endif
Thanks for reporting. We'll look into this.
We think this is addressed by #1741. Closing this down.
Another problem resulting from #1679.
Compiling yields
Foo_py.i:21: Error: Template 'Bar' undefined.
This is due to
%template
being placed before the definition ofBar
inFoo_py.i