ideas about ranges

Lionello Lunesu lionello at
Fri May 22 20:20:56 PDT 2009

"Steven Schveighoffer" <schveiguy at> wrote in message 
news:op.uucxvnxleav7ka at
> On Fri, 22 May 2009 20:43:22 -0400, Lionello Lunesu 
> <lio at> 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 somesuch.

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 mailing list