<div>In concurrency.d (version 2.055, line 1247 - 1250) , there's some codes related to internal implementation of List(T). </div><div><br></div><div>"</div><div> Range opSlice()</div><div> {</div><div> return Range( cast(Node*) &m_first );</div>
<div> }</div><div>"</div><div><br></div><div>What does this mean? m_first itself is Node *, then &m_first is Node **, then we cast it back to (Node *)? Does it make sense?</div><div><br></div><div>If we change "&m_first" to "m_first", it still is weird, because in line 1169:</div>
<div><div>"</div><div> @property bool empty() const</div><div> {</div><div> return !m_prev.next;</div><div> }</div></div><div>"</div><div><br></div><div>The list is empty when m_first is null, that is m_prev is null, not m_prev.next is null. </div>
<div><br></div><div>Is my understanding of these codes completely wrong, or it is a bug in the code?</div><div><br></div><div>Thanks.</div><div><br></div><div><br></div>