On Saturday, 11 February 2023 at 05:02:49 UTC, Steven
Schveighoffer wrote:
Reported
https://issues.dlang.org/show_bug.cgi?id=23687
Assuming this is a compiler bug and it gets fixed, does this seem
like something worth trying to add to std.range?
On Friday, 10 February 2023 at 22:10:20 UTC, Ben Jones wrote:
I'm trying to write a range adaptor for linked list types. The
range type seems to work OK, but my helper function to deduce
the node type has a compiler error. My hunch is that
`nextField` loses its association with T when I'm try
On 2/10/23 5:10 PM, Ben Jones wrote:
I'm trying to write a range adaptor for linked list types. The range
type seems to work OK, but my helper function to deduce the node type
has a compiler error. My hunch is that `nextField` loses its
association with T when I'm trying to pass it as a templ
On Friday, 10 February 2023 at 23:39:11 UTC, Ruby The Roobster
wrote:
The problem is that Node.next is not, and cannot be `static`.
Thus, there is no way for you to pass it as an alias template
parameter, and this should be considered a compiler bug that
this doesn't error out.
Nevermind
On 2/10/23 14:10, Ben Jones wrote:
> Any idea how to fix the helper method?
I came up with the following solution:
> struct LinkedListAdaptor(alias nextField, T){
In this case nextField will be a callable (a lambda below).
> void popFront() {
> current = __traits(child, current,
On Friday, 10 February 2023 at 22:10:20 UTC, Ben Jones wrote:
I'm trying to write a range adaptor for linked list types. The
range type seems to work OK, but my helper function to deduce
the node type has a compiler error. My hunch is that
`nextField` loses its association with T when I'm try
I'm trying to write a range adaptor for linked list types. The
range type seems to work OK, but my helper function to deduce the
node type has a compiler error. My hunch is that `nextField`
loses its association with T when I'm trying to pass it as a
template parameter inside the helper metho