[PATCH] D103935: Add Twine support for std::string_view.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 16:11:39 PDT 2021


dexonsmith added subscribers: lhames, dblaikie.
dexonsmith added a comment.

@dblaikie / @lhames , maybe one of you has ideas for how to add Twine support for std::string_view in C++17 and later without changing Twine's ABI?

I think the following won't work, because the lifetime of the StringRef wouldn't be extended to match the lifetime of the calling expression:

  Twine(const std::string_view &view) : Twine(StringRef(view)) {}


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103935



More information about the llvm-commits mailing list