Ranges: is it ok if front is a data member?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Dec 12 08:54:30 PST 2013


On 12/12/13 17:51, Joseph Rushton Wakeling wrote:
> Isn't the issue here not whether or not it will work in terms of your type being
> a range, and more that it means that users can overwrite the value of front?

... if OTOH the idea is that front never changes, then I'd suggest an enum, as 
is already common for empty (e.g. in RNGs, you typically get "enum bool empty = 
false").



More information about the Digitalmars-d-learn mailing list