Boost logo

Boost :

From: gideon may (gideon_at_[hidden])
Date: 2001-04-26 08:14:09


I am just starting with the BPL (cool stuff) and came across
the following problem.
I have a C++ class with a number of overloaded static methods e.g. :

   // A friendly class.
   class hello
       hello(const std::string& country) { this->country = country; }
       std::string greet() const { return "Hello from " + country; }
          static void over(void) { }
          static int over(int) { return 0; }
       std::string country;

When I try to generate the python binding with :

        hello_class.def((void (hello::*)(void)) hello::over, "over");
        hello_class.def((int (hello::*)(int)) hello::over, "over");

the compiler barks both under Win2K MVC6, linux gcc and Irix/CC 7.3.
It seems that the typecast for the hello::over function is not complete
(missing static) but I am not able to put static in the typecast.

Any idea on how to solve this without reverting to wrapper functions ?

ciao, gideon
Is there a way

Boost list run by bdawes at, gregod at, cpdaniel at, john at