Boost logo

Boost Users :

From: david_at_2good (david_at_[hidden])
Date: 2002-08-16 00:54:56


--- In Boost-Users_at_y..., "Hickman, Greg" <greg.hickman_at_l...> wrote:
> With Borland 5.5.1, I'm not having any luck using a shared_ptr in a
boolean
> context. The compiler complains that the 'if' condition below
contains an
> "Illegal structure operation". Is this a known deficiency with my
compiler?
>
> -Greg Hickman
>
>
> #include <boost/shared_ptr.hpp>
>
> int
> main(int argc, char* argv[])
> {
> boost::shared_ptr<int> intp;
>
> if (intp) // error here

Change this to:

  if (intp.get())

> ;
>
> return 0;
> }


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