On Sunday, 4 March 2018 at 21:47:43 UTC, Jonathan M Davis wrote:
On Sunday, March 04, 2018 21:03:23 arturg via
Digitalmars-d-learn wrote:
isn't this what DIP 1005 tried to solve?
No. What DIP 1005 was trying to solve was avoiding having to
have imports used by your function signature or temp
On Sunday, March 04, 2018 21:03:23 arturg via Digitalmars-d-learn wrote:
> On Sunday, 4 March 2018 at 19:58:14 UTC, ag0aep6g wrote:
> > On 03/04/2018 08:54 PM, aliak wrote:
> >> wait a minute... so I can't use any std.range functions on a
> >> type if I add the range primitives as free functions? O
On Sunday, 4 March 2018 at 19:58:14 UTC, ag0aep6g wrote:
On 03/04/2018 08:54 PM, aliak wrote:
wait a minute... so I can't use any std.range functions on a
type if I add the range primitives as free functions? O.o
Yes. In other words: You can't implement range primitives as
free functions. Bec
On 03/04/2018 08:54 PM, aliak wrote:
wait a minute... so I can't use any std.range functions on a type if I
add the range primitives as free functions? O.o
Yes. In other words: You can't implement range primitives as free
functions. Because std.range (and std.algorithm, etc.) doesn't know
abo
On Sunday, 4 March 2018 at 13:17:30 UTC, Adam D. Ruppe wrote:
On Sunday, 4 March 2018 at 12:57:41 UTC, aliak wrote:
@property int front(D d) { return 2; }
@property bool empty(D d) { return false; }
void popFront(D d) {}
Those functions are in scope for your function, but not inside
std.range
On Sunday, 4 March 2018 at 13:17:30 UTC, Adam D. Ruppe wrote:
On Sunday, 4 March 2018 at 12:57:41 UTC, aliak wrote:
@property int front(D d) { return 2; }
@property bool empty(D d) { return false; }
void popFront(D d) {}
Those functions are in scope for your function, but not inside
std.range
On Sunday, 4 March 2018 at 12:57:41 UTC, aliak wrote:
@property int front(D d) { return 2; }
@property bool empty(D d) { return false; }
void popFront(D d) {}
Those functions are in scope for your function, but not inside
std.range.
in other words std.range hasn't imported your module, so it
Hi, I have a custom type D with front/popFront/empty implemented
as free functions, but isInputRange returns false. I copied the
implementation of isInputRange, and that custom implementation
returns true... anyone know what's going on here?
===
import std.stdio, std.range, std.traits;
// Cod