Re: [C++-sig] Weird function call results

2014-12-26 Thread ilias
Alex, > It's not a bug, it's as designed. Boost.python tries function overloads > in reverse registration order and picks the first one that works, in the > sense that all the arguments convert. Is that behavior specified somewhere in the documentation? __

[C++-sig] Weird function call results

2014-12-19 Thread ilias
I got an overloaded function: void f(int n) { std::clog << "invoked f(int n = " << n << ")" << std::endl; } void f(double d) { std::clog << "invoked f(double d = " << d << ")" << std::endl; } If I put declarations in that order: void (*f_int)(int) = &f; void (*f_double)(double) = &f; BOOST

[C++-sig] How to override a property setter?

2014-12-19 Thread ilias
I got a class: class X { private: std::wstring text_; public: std::wstring text() const { return text_; } void set_text(const std::string& text) { text_ = from_utf8(text); } void set_text(const std::wstring& text) { text_ = text; } }; I'm trying to use it as a property: BOOST_PYTHON_MODU