From: Stephen T. <ste...@gm...> - 2011-10-05 13:46:32
|
Warning message: Warning 503: Can't wrap 'operator <' unless renamed to a valid identifier. I have tried to wrap this function that is a part of the mycode namespace. namespace mycode { class MYPROJECT_EXPORT Latitude { public: Latitude ( double value ) : m_value ( value ) {} double get_value () const { return m_value; } private: double m_value; }; MYPROJECT_EXPORT bool operator< ( Latitude const& lhs, Latitude const& rhs ); } // namespace mycode With the following line in the SWIG interface file: %include "Latitude.hpp" %rename(LatitudeLessThan) operator< ( Latitude const&, Latitude const& ); I tried it with the namespace 'mycode' and without it. Either way I get the Warning. From the documentation it was unclear to me if I should include the namespace in the line. |