[PATCH] D73640: [SmallString] Add explicit conversion to std::string

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 10:17:03 PST 2020


JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: llvm/include/llvm/ADT/SmallString.h:278
 
+  // Explicit conversion to std::string.
+  explicit operator std::string() const { return str().str(); }
----------------
MaskRay wrote:
> The comment is redundant, because the code self explains.
It's the same in StringRef, but I agree!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73640/new/

https://reviews.llvm.org/D73640





More information about the llvm-commits mailing list