<div dir="ltr">> Why str method is without "const" attribute? Any reasonable reason?<br><div><br></div><div>Probably an accident; `const` is generally best-effort until someone needs a thing to be `const` :)</div><div><br></div><div>Added in <a href="https://github.com/llvm/llvm-project/commit/2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf" target="_blank">https://github.com/llvm/llvm-project/commit/2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf</a> . Thanks!</div><div><br></div><div>George</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 25, 2020 at 2:30 AM via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">include/llvm/Support/raw_ostream.h, line 568:<br>
<br>
  StringRef str() { return StringRef(OS.data(), OS.size()); }<br>
<br>
Why str method is without "const" attribute? Any reasonable reason?<br>
<br>
Thanks!<br>
-Stepan<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>