
19 Apr
2007
19 Apr
'07
5:03 p.m.
Hi, I'm getting a compiler error with MSVC .NET 2003 in release mode. Compiling the following code gives: "error C2676: binary '&&' : 'const ASP' does not define this operator or a conversion to a type acceptable to the predefined operator" If I compile in debug mode, or if I remove the "const" on the shared_ptr arguments, it complies without complaint. ==== #include <boost/shared_ptr.hpp> class A; class B; class C; typedef boost::shared_ptr<A> ASP; typedef boost::shared_ptr<B> BSP; typedef boost::shared_ptr<C> CSP; void test(const ASP& a, const BSP& b, const CSP& c) { bool rc = false; if (a && b && c) rc = true; } ====