Export of internal Abseil changes.

--
f4bb8afa9376b4120f56f3beff7b07260da4a5c2 by CJ Johnson <johnsoncj@google.com>:

Add user to Github list

PiperOrigin-RevId: 209630262
GitOrigin-RevId: f4bb8afa9376b4120f56f3beff7b07260da4a5c2
Change-Id: I3fedf35011d805ee4a20b92e073b43523b47d15b
This commit is contained in:
Abseil Team 2018-08-21 11:31:02 -07:00 committed by Derek Mauro
parent fefc83638f
commit bed5bd6e18
54 changed files with 302 additions and 302 deletions

View file

@ -23,7 +23,7 @@
// designed to be used as a parameter type that efficiently manages conversion
// to strings and avoids copies in the above operations.
//
// Any routine accepting either a std::string or a number may accept `AlphaNum`.
// Any routine accepting either a string or a number may accept `AlphaNum`.
// The basic idea is that by accepting a `const AlphaNum &` as an argument
// to your function, your callers will automagically convert bools, integers,
// and floating point values to strings for you.
@ -65,7 +65,7 @@
namespace absl {
namespace strings_internal {
// AlphaNumBuffer allows a way to pass a std::string to StrCat without having to do
// AlphaNumBuffer allows a way to pass a string to StrCat without having to do
// memory allocation. It is simply a pair of a fixed-size character array, and
// a size. Please don't use outside of absl, yet.
template <size_t max_size>
@ -119,8 +119,8 @@ enum PadSpec : uint8_t {
// Hex
// -----------------------------------------------------------------------------
//
// `Hex` stores a set of hexadecimal std::string conversion parameters for use
// within `AlphaNum` std::string conversions.
// `Hex` stores a set of hexadecimal string conversion parameters for use
// within `AlphaNum` string conversions.
struct Hex {
uint64_t value;
uint8_t width;
@ -168,8 +168,8 @@ struct Hex {
// Dec
// -----------------------------------------------------------------------------
//
// `Dec` stores a set of decimal std::string conversion parameters for use
// within `AlphaNum` std::string conversions. Dec is slower than the default
// `Dec` stores a set of decimal string conversion parameters for use
// within `AlphaNum` string conversions. Dec is slower than the default
// integer conversion, so use it only if you need padding.
struct Dec {
uint64_t value;
@ -271,7 +271,7 @@ class AlphaNum {
//
// Merges given strings or numbers, using no delimiter(s).
//
// `StrCat()` is designed to be the fastest possible way to construct a std::string
// `StrCat()` is designed to be the fastest possible way to construct a string
// out of a mix of raw C strings, string_views, strings, bool values,
// and numeric values.
//
@ -279,7 +279,7 @@ class AlphaNum {
// works poorly on strings built up out of fragments.
//
// For clarity and performance, don't use `StrCat()` when appending to a
// std::string. Use `StrAppend()` instead. In particular, avoid using any of these
// string. Use `StrAppend()` instead. In particular, avoid using any of these
// (anti-)patterns:
//
// str.append(StrCat(...))
@ -328,26 +328,26 @@ ABSL_MUST_USE_RESULT inline std::string StrCat(const AlphaNum& a, const AlphaNum
// StrAppend()
// -----------------------------------------------------------------------------
//
// Appends a std::string or set of strings to an existing std::string, in a similar
// Appends a string or set of strings to an existing string, in a similar
// fashion to `StrCat()`.
//
// WARNING: `StrAppend(&str, a, b, c, ...)` requires that none of the
// a, b, c, parameters be a reference into str. For speed, `StrAppend()` does
// not try to check each of its input arguments to be sure that they are not
// a subset of the std::string being appended to. That is, while this will work:
// a subset of the string being appended to. That is, while this will work:
//
// std::string s = "foo";
// string s = "foo";
// s += s;
//
// This output is undefined:
//
// std::string s = "foo";
// string s = "foo";
// StrAppend(&s, s);
//
// This output is undefined as well, since `absl::string_view` does not own its
// data:
//
// std::string s = "foobar";
// string s = "foobar";
// absl::string_view p = s;
// StrAppend(&s, p);