ideas about ranges
lionello at lunesu.remove.com
Fri May 22 20:20:56 PDT 2009
"Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
news:op.uucxvnxleav7ka at steves.networkengines.com...
> On Fri, 22 May 2009 20:43:22 -0400, Lionello Lunesu
> <lio at lunesu.remove.com> wrote:
>> 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 what Andrei said: a nullable reference to T, which might be a nullable
reference to a pointer when iterating over pointers.
More information about the Digitalmars-d