<div dir="ltr">It seems like ArrayRefs are supposed to be immutable (<div>However, as far as i can tell, the iterators are defined wrong to make this true.</div><div><br></div><div>While </div><div>ArrayRef<int> Foo(Something);</div><div>Foo[0] = 5;</div><div><br></div><div>will give a compile time error.</div><div><br></div><div>something like:<br><br></div><div>ArrayRef<int> Foo(Something);</div><div>std::sort(Foo.begin(), Foo.end());</div><div><br></div><div>Will work fine.</div><div><br></div><div>Is this expected?</div><div><br></div><div>(FWIW: I expected this to only work with a MutableArrayRef)</div><div><br></div><div><br></div></div>