Boost logo

Boost Users :

From: Tim Murison (tim.murison_at_[hidden])
Date: 2007-04-19 13:03:59


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;
}

====


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net