
On Fri, May 02, 2008 at 02:54:19PM -0500, Robert Dailey wrote:
I'm having a bit of trouble getting user-defined objects working with Boost.Test. I skimmed through the docs and I didn't see anything on this subject, but the boost documentation isn't the most intuitive documentation, so it is a bit easy to miss obvious stuff like this.
Hopefully you read the current docs, the one on www.boost.org is outdated but not yet replaced.
Anyway, I have a class named "Foo", and I've given it an overloaded boolean == operator. When I do the following, it fails to compile under MSVC9:
The class is defined as follows:
class Foo { bool operator== ( Foo const& operand )
You should make this operator a const one. This isn't your problem but ... bool operator== ( Foo const& operand ) const
{ return data == operand.data; } };
Jens