
Agustín K-ballo Bergé schrieb:
El 06/05/2010 02:04 p.m., Olaf Peter escribió:
bool operator==( const foo& lhs, const foo& rhs ) { return lhs == rhs; }
Unless I'm missing something, this looks like infinite recursion, which would cause stack overflow. Don't you get a warning from your compiler?
yes, that is it (over right I came to the same result). Here, this works: bool operator==( const foo& lhs, const foo& rhs ) { return fusion::equal_to( lhs, rhs ); } fusion::operator==( lhs, rhs ) won't compile fusion_tie.cpp: In function ‘bool operator==(const<unnamed>::foo&, const<unnamed>::foo&)’: fusion_tie.cpp:18: error: no matching function for call to ‘operator==(const<unnamed>::foo&, const<unnamed>::foo&)’ I've got no warning from gcc version 4.4.1 (no extra Warning option). Thanks, Olaf