Christian Lippka wrote:
Thorsten Behrens wrote:
Daniel Boelzle <[EMAIL PROTECTED]> writes:
How about a (possibly weirdo) idea, offering a non-nullable Reference
class (Reference<XFoo,NEVER_NULL>?):
That class would
- strictly follow the interface of the nullable Reference
- but comes without default ctor
- and follows the throw-mimic when being assigned/constructed with a
null-reference.
Technical issues aside, I pretty much like this idea, because that's
how most of the people implicitely use a Reference. If this can be
implemented without thwarting type safety, I'm all for it - complete
with a nice BOOST_CURRENT_FUNCTION assertion for the NULL case.
I'm more for optimizing
Reference< X > ( Reference< X >, UNO_QUERY_THROW )
to just check and throw and not calling queryinterface.
As I already wrote, at least for XInterface that is not easily done:
"If the original UNO design would have used something other than
'query(XInterface) == query(XInterface)' for object identity check, we
could improve performance of the Reference<T>(Reference<T> const &,
UNO_QUERY_THROW) by special-casing it."
-Stephan
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]