blob: ac418f8e5360c6e3efcb9fbacdfce7c357f0f6b6 [file] [log] [blame]
%module template_construct
// Tests templates to make sure an extra <> in a constructor is ok.
%inline %{
template<class T>
class Foo {
T y;
public:
#ifdef SWIG
Foo<T>(T x) : y(x) { }
#else
// Modern compilers reject this, so feed the compiler the corrected
// version.
Foo(T x) : y(x) { }
#endif
};
%}
%template(Foo_int) Foo<int>;