Boost logo

Boost :

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


Hi,

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
   {
     public:
       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; }
     private:
       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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk