[all-commits] [llvm/llvm-project] 2e4977: [ADT] Implicitly convert between StringRef and std...

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Tue Jan 28 05:03:47 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e4977965b57c53db81e729e390dbda6807ef7fc
      https://github.com/llvm/llvm-project/commit/2e4977965b57c53db81e729e390dbda6807ef7fc
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2020-01-28 (Tue, 28 Jan 2020)

  Changed paths:
    M llvm/include/llvm/ADT/StringRef.h
    M llvm/unittests/ADT/StringRefTest.cpp

  Log Message:
  -----------
  [ADT] Implicitly convert between StringRef and std::string_view when we have C++17

This makes the types almost seamlessly interchangeable in C++17
codebases. Eventually we want to replace StringRef with the standard
type, but that requires C++17 being the default and a huge refactoring
job as StringRef has a lot more functionality.




More information about the All-commits mailing list