Viktor Gal
2017-07-09 10:37:43 UTC
Hi
based on the documentation of swig 3.0 "7.3.9 Type traits for metaprogramming” swig suppose to be able to handle type traits.
i have the following templated function my c++ code:
template <typename T>
inline bool append_element(typename std::enable_if<!std::is_base_of<CSGObject, std::remove_pointer<T>>::value, T>::type e, const char* name=“”);
and added the following %template directives into .i
%template(append_element_real) append_element<double>;
%template(append_element_float) append_element<float>;
when i try to call from target language append_element_float, i’m getting
NotImplementedError: Wrong number or type of arguments for overloaded function ‘append_element_float’
Possible C/C++ prototypes are:
append_element< float32_t >(std::enable_if< !std::is_base_of<CSGObject,std::remove_pointer< float > >::value,float >::type,char const *)
any ideas?
or as i look into the code itself it’s just not possible to have this with swig support?
cheers,
viktor
based on the documentation of swig 3.0 "7.3.9 Type traits for metaprogramming” swig suppose to be able to handle type traits.
i have the following templated function my c++ code:
template <typename T>
inline bool append_element(typename std::enable_if<!std::is_base_of<CSGObject, std::remove_pointer<T>>::value, T>::type e, const char* name=“”);
and added the following %template directives into .i
%template(append_element_real) append_element<double>;
%template(append_element_float) append_element<float>;
when i try to call from target language append_element_float, i’m getting
NotImplementedError: Wrong number or type of arguments for overloaded function ‘append_element_float’
Possible C/C++ prototypes are:
append_element< float32_t >(std::enable_if< !std::is_base_of<CSGObject,std::remove_pointer< float > >::value,float >::type,char const *)
any ideas?
or as i look into the code itself it’s just not possible to have this with swig support?
cheers,
viktor