-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
string_view
overload to absl::StrJoin
This allows users to pass a collection of string-like objects in an `initializer_list` without having to convert everything to the same type first. `initializer_list` has the requirement that everything is copied in to the list. For strings hitting the `string_view` overload avoids unnecessary copies. This may be a breaking change if `absl::StrJoin` has an explicit template parameter, for example `absl::StrJoin<std::string>({foo, "bar"});`. In this case, remove the explicit template parameter. PiperOrigin-RevId: 633295575 Change-Id: Ie5f0860f409f639a27a58949842ec961e0b3bdeb
- Loading branch information
1 parent
692d9e5
commit 7384185
Showing
2 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters