Hello,

I have a strange problem with recent g++ while trying to get a pointer
on an overloaded function.

To extract one specific version of the overloaded function I tried :

float ( *v2d_cross )( const Vector2& , const Vector2&  ) = cross;

But then I get this error:

src/wrappers/export_vertex.cpp|120| error: no matches converting
function 'cross' to type 'float (*)(const class Vector2&, const class
Vector2&)'
src/utils/amap_util_vector.h|236| error: candidates are: float
cross(const Vector2&, const Vector2&)
src/utils/amap_util_vector.h|514| error:                 Vector3
cross(const Vector3&, const Vector3&)


So I also tried this:

typedef float ( *r_cv2cv2 )(  const Vector2&, const Vector2& );
r_cv2cv2 v2d_cross = cross;

But I get the exact same error.

At last, I tried to directly reference it :

typedef float ( *r_cv2cv2 )(  const Vector2&, const Vector2& );
def("cross", (r_cv2cv2)cross); // This is a Boost.Python line definition

But then I get this error :

src/wrappers/export_vertex.cpp|418| error: overloaded function with no
contextual type information

The problem is: 1, I don't understand what I do wrong, and 2, it used to
work.

Pierre
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to