Hi,

could someone tell me what the problem(s) with the following are? Also, how do I make "$" work with the slice operator?

Thanks a lot.

interface Graph
{
  bool opIndex(uint u, uint v)
  in { assert(u < n && v < n); }

  Graph opSlice(uint start, uint end)
  in { assert(start < n && end <= n); }
  //why does this not compile:
  out(g) { assert(g.n == end - start); }

  @property uint n();
}

interface MutableGraph : Graph
{
  bool addEdge(uint u, uint v)
  in { assert(u < n && v < n); }
  //why does this produce a segmentation fault when executed:
  out(ret) { assert(this[u,v]); }
}

Reply via email to