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

2014-12-19 Thread Stefan Seefeld
On 18/12/14 06:13 AM, ilias wrote: > 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: > > v

[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