[Issue 2347] opIs is missing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 10 02:25:40 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2347
------- Comment #2 from 2korden at gmail.com 2008-09-10 04:25 -------
An example of "user-defined smart references" would be a ScopePtr!(T) that
destroys an object when it goes out of the scope. Some reference-counted smart
pointer also behaves just like an ordinary point and one would like to be able
to compare SmartPtr against null using "is null" syntax:
auto ptr = SmartPtr!(MyClass)(new MyClass());
assert(ptr !is null);
--
More information about the Digitalmars-d-bugs
mailing list