$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] shared_ptr and && operator
From: Robert Dailey (rcdailey_at_[hidden])
Date: 2009-06-08 15:01:08
Hey guys,
Just wondering what happens if I do this:
boost::shared_ptr<Foo> foo;
boost::shared_ptr<Bar> bar;
if( foo && bar )
{
// Do stuff if both pointers are valid...
}
I did not see an overloaded && operator in the interface of the class. When
using normal pointer semantics, this code is valid through implicit
conversion of a pointer value to a boolean type.