blob: e135e3913dc6be07b45f3b9a7f49e95162320b58 [file] [log] [blame]
%module template_private_assignment
swig-devel mailing list report problem explained 2014-01-07
A setter for the global variable deleted_bits is generated because there is no template
instantiation for the template and hence SWIG does not find the private assignment operator.
SwigValueWrapper is probably on by default for templates that are not instantiated for the
same reason.
The solution is probably to add an instantiation of the template as soon as one is parsed,
that is an implicit empty %template().
%inline %{
template<typename T, typename U> struct DeletedBits {
// DeletedBits& operator=(const DeletedBits&) = delete;
DeletedBits& operator=(const DeletedBits&);
DeletedBits<int, double> deleted_bits;
// This works around the problem
//%template() DeletedBits<int, double>;