Considering a C++ class like
template <uint32_t Size, typename StorageType>
Vector(StorageType x, StorageType y);
Vector(StorageType x, StorageType y, StorageType z);
Vector(StorageType x, StorageType y, StorageType z, StorageType w);
I wrap it in SWIG using
%ignore Vector(int8_t, int8_t);
%ignore Vector(int8_t, int8_t, int8_t, int8_t);
So that the 2- and 4-parameter constructors will be ignored.
However, what seems to be happening is the %template macro is reducing the int8_t typedef down to 'signed char' and then when doing the %ignore, it is failing to match it since I guess the %ignore isn't also doing typedef reduction?
I even tried using the '-notemplatereduce' SWIG argument but it appeared to have no effect as running SWIG with '-debug-template' gives
Vector.i:27: template_debug: Searching for match to: 'Vector<(3,int8_t)>'
searching for : 'Vector<(3,int8_t)>' (explicit specialization)
searching for : 'Vector<(3,signed char)>' (explicit specialization with typedef reduction)
matched partials: NONE
chosen primary template: 'Vector'
and still the %ignore did not work as expected.
Log in to post a comment.