"Steven Schveighoffer" <[email protected]> wrote in message
news:[email protected]...
On Fri, 22 May 2009 20:43:22 -0400, Lionello Lunesu
<[email protected]> wrote:
[snip]
You don't need a pointer to T, you need a nullable T :)
...which doesn't exist...
No, you need a pointer. If T is a reference type, how do you distinguish
a null element from the end of the iteration?
If the container/range contains pointers then T would be a pointer, let's
say S*, and the function would return a nullable-T, let's say nullable<S*>
or somesuch.
Or what Andrei said: a nullable reference to T, which might be a nullable
reference to a pointer when iterating over pointers.
L.