"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
[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
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