On Sunday, 29 January 2017 at 14:16:37 UTC, ezneh wrote:
Here :

 foreach(uint  u; FooCol.j) writef("%s ", u); writef(\n);

I see, but apparently this isn't the only issue. I replaced the whole unittest with this, and it still doesn't compile:

import std.stdio;
void main() {
  struct MyStruct {
    uint   i;
    float  j;
  MyStruct data;
  Columns!(MyStruct) MyCols;

Problems this time were in the AfterLast function, which I modified like this:

string AfterLast(string s, char c) {
  foreach_reverse(int i, char d; s) if(c==d) return s[i+1..$];
  return s;

However there are still some errors which I don´t know how to fix:

columns1.d(45): Error: cannot implicitly convert expression (this) of type Columns!(MyStruct) to Columns!(MyStruct)* columns1.d(63): Error: template instance columns1.Columns!(MyStruct) error instantiating

Line 63 is the declaration of MyCols, and line 45 would be thisÑ

At opIndex(uint i) { return At(this,i); }

Reply via email to