[all-commits] [llvm/llvm-project] d70492: [SmallString] Add explicit conversion to std::string

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Jan 29 10:17:23 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d7049213d0fcda691c9e79f9b41e357198d99738
      https://github.com/llvm/llvm-project/commit/d7049213d0fcda691c9e79f9b41e357198d99738
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M llvm/include/llvm/ADT/SmallString.h
    M llvm/unittests/ADT/SmallStringTest.cpp

  Log Message:
  -----------
  [SmallString] Add explicit conversion to std::string

With the conversion between StringRef and std::string now being
explicit, converting SmallStrings becomes more tedious. This patch adds
an explicit operator so you can write std::string(Str) instead of
Str.str().str().

Differential revision: https://reviews.llvm.org/D73640




More information about the All-commits mailing list