[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [sdo] [SDO-87]: Add RefCountingPointer::operator void*() method
Geoff Winn [10/Jan/07 10:36 AM] In the 2.1 spec I deleted the section in chapter 5 that required the use of double negation. It is at least now permitted to provide a sensible implementation for if (p) where p is a smart pointer. I agree with the more general point though. We should be clearer about what we expect from a reference counted pointer. Michael B. Yoder [23/Aug/07 01:52 AM] Even better than a void* conversion operator is to use the safe bool idiom. This allows conversions in bool expressions such as if statments, without any unwanted side effects. http://www.artima.com/cppsource/safebool.html Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]