Re: [boost] Re: shared_ptr operator bool

2003-03-27 Thread David Abrahams
"James Curran" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> Am I crazy, or should there be a pair of parens after "ptr"? > > To the latter question, no. In the example "ptr" refers to a public > data member of struct A, and is of type shared_ptr. Parens would only > be needed if we

[boost] Re: shared_ptr operator bool

2003-03-26 Thread Philippe A. Bouchard
[EMAIL PROTECTED] wrote: [...] > I would suspect your compiler. This works as expected (e.g., no > assertions; they both evaluate to true) with Borland C++ Builder 5.6 > and GCC 3.2 prerelease. Some compilers have problems with template class' cast operators. gcc 3.x had similar problems with

[boost] Re: shared_ptr operator bool

2003-03-26 Thread James Curran
David Abrahams wrote: > Am I crazy, or should there be a pair of parens after "ptr"? To the latter question, no. In the example "ptr" refers to a public data member of struct A, and is of type shared_ptr. Parens would only be needed if we wanted to say "a.ptr.ptr()" The former has alway