[C++-sig] Methods returning *this

Piotr Jaroszynski p.jaroszynski at gmail.com
Sun Apr 15 01:51:46 CEST 2007


Hello,

I have a problem with wrapping such methods:
struct Foo {
	Foo & blah(....) {
		(....)
		return *this;
	}
};

What call policy should I use? I have really (blindly) tried quite a few of 
them and I can't get rid of the segfault when trying to access the object 
after calling its blah method.

TIA for help!

-- 
Best Regards,
Piotr Jaroszynski



More information about the Cplusplus-sig mailing list