Daniel Berlin via llvm-dev
2017-Oct-01 00:21 UTC
[llvm-dev] Is ArrayRef supposed to be immutable?
It seems like ArrayRefs are supposed to be immutable ( However, as far as i can tell, the iterators are defined wrong to make this true. While ArrayRef<int> Foo(Something); Foo[0] = 5; will give a compile time error. something like: ArrayRef<int> Foo(Something); std::sort(Foo.begin(), Foo.end()); Will work fine. Is this expected? (FWIW: I expected this to only work with a MutableArrayRef) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170930/bb311c53/attachment.html>