Rewriting a c++ template to D (replacing iterator with ranges "properly")

Meta jared771 at gmail.com
Fri Jan 26 14:35:25 UTC 2018


On Friday, 26 January 2018 at 14:16:04 UTC, aliak wrote:
> 1) I've seen some phobos code checking for assignability like 
> this:
>
>   is(typeof(range.front = false))
>
> ... is that an advantage of that over hasAssignableElements? Or 
> is that just basically combining constraints 3 and 4 which I 
> have above?

Where did you see this? That's got to be some very old code; I 
can't think of any instance where you would not want to use 
`hasAssignableElements` instead.


More information about the Digitalmars-d-learn mailing list