isInputRange not satisfied even if all individual conditions are satisfied

Paul Backus snarwin at gmail.com
Fri Jun 26 14:13:54 UTC 2020


On Friday, 26 June 2020 at 13:53:46 UTC, Johannes Loher wrote:
> Am 26.06.20 um 15:35 schrieb ag0aep6g:
>> `isInputRange!R` fails because it has no knowledge of your 
>> free `empty` function. Without `empty`, `R` is obviously not a 
>> range.
>
> Ah, OK, that makes sense. It's kind of sad though because it 
> really limits the extensibility of existing types with UFCS. Do 
> you know if there is a way around this?

You can use my recently-released Dub package `addle` to make your 
UFCS extensions visible to std.range.

Dub: https://code.dlang.org/packages/addle
Announcement: 
https://forum.dlang.org/thread/yruztugitygumwcsmjkc@forum.dlang.org


More information about the Digitalmars-d-learn mailing list