Changes imported from Abseil "staging" branch:
- cdcf33b6176a51b6b9bcdf1032b4aa407a9a6990 Clarify that "0" without a suffix parses to ZeroDuration(... by Abseil Team <absl-team@google.com> - 65c8997d5a3a4cff63f1dc8a72dcee89c456a17b spelling 'available' by Abseil Team <absl-team@google.com> - 1a2b51427c38d471a3f2b8806f015d1598877559 Clean up a comment by Abseil Team <absl-team@google.com> - ea1ae153fff759a60fbf946f2865f14253e21289 Fix typo in string_view comments. by Abseil Team <absl-team@google.com> - 94d7e6d9e9e379e352aa3cc5e37ac4ffd81db234 Replace x64_windows_msvc with x64_windows (bazel default)... by Xiaoyi Zhang <zhangxy@google.com> GitOrigin-RevId: cdcf33b6176a51b6b9bcdf1032b4aa407a9a6990 Change-Id: I3ccdcf1b8c5c08997e68cb1f336b02f003a3a72d
This commit is contained in:
parent
9c4178d13e
commit
cc4bed2d74
4 changed files with 9 additions and 9 deletions
|
@ -36,7 +36,7 @@ config_setting(
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "windows",
|
name = "windows",
|
||||||
values = {
|
values = {
|
||||||
"cpu": "x64_windows_msvc",
|
"cpu": "x64_windows",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@
|
||||||
|
|
||||||
// ABSL_HAVE_STD_ANY
|
// ABSL_HAVE_STD_ANY
|
||||||
//
|
//
|
||||||
// Checks whether C++17 std::any is availble by checking whether <any> exists.
|
// Checks whether C++17 std::any is available by checking whether <any> exists.
|
||||||
#ifdef ABSL_HAVE_STD_ANY
|
#ifdef ABSL_HAVE_STD_ANY
|
||||||
#error "ABSL_HAVE_STD_ANY cannot be directly set."
|
#error "ABSL_HAVE_STD_ANY cannot be directly set."
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -176,7 +176,7 @@ class string_view {
|
||||||
constexpr string_view(const char* str) // NOLINT(runtime/explicit)
|
constexpr string_view(const char* str) // NOLINT(runtime/explicit)
|
||||||
: ptr_(str), length_(StrLenInternal(str)) {}
|
: ptr_(str), length_(StrLenInternal(str)) {}
|
||||||
|
|
||||||
// Implicit consructor of a `string_view` from a `const char*` and length
|
// Implicit constructor of a `string_view` from a `const char*` and length.
|
||||||
constexpr string_view(const char* data, size_type len)
|
constexpr string_view(const char* data, size_type len)
|
||||||
: ptr_(data), length_(CheckLengthInternal(len)) {}
|
: ptr_(data), length_(CheckLengthInternal(len)) {}
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ class string_view {
|
||||||
|
|
||||||
// Explicit conversion operators
|
// Explicit conversion operators
|
||||||
|
|
||||||
// Supports conversion to both `std::basic_string` where available.
|
// Converts to `std::basic_string`.
|
||||||
template <typename A>
|
template <typename A>
|
||||||
explicit operator std::basic_string<char, traits_type, A>() const {
|
explicit operator std::basic_string<char, traits_type, A>() const {
|
||||||
if (!data()) return {};
|
if (!data()) return {};
|
||||||
|
|
|
@ -477,11 +477,11 @@ inline std::ostream& operator<<(std::ostream& os, Duration d) {
|
||||||
|
|
||||||
// ParseDuration()
|
// ParseDuration()
|
||||||
//
|
//
|
||||||
// Parses a duration std::string consisting of a possibly signed sequence
|
// Parses a duration std::string consisting of a possibly signed sequence of
|
||||||
// of decimal numbers, each with an optional fractional part and a
|
// decimal numbers, each with an optional fractional part and a unit
|
||||||
// unit suffix. The valid suffixes are "ns", "us" "ms", "s", "m",
|
// suffix. The valid suffixes are "ns", "us" "ms", "s", "m", and "h".
|
||||||
// and "h". Simple examples include "300ms", "-1.5h", and "2h45m".
|
// Simple examples include "300ms", "-1.5h", and "2h45m". Parses "0" as
|
||||||
// Parses "inf" and "-inf" as +/- `InfiniteDuration()`.
|
// `ZeroDuration()`. Parses "inf" and "-inf" as +/- `InfiniteDuration()`.
|
||||||
bool ParseDuration(const std::string& dur_string, Duration* d);
|
bool ParseDuration(const std::string& dur_string, Duration* d);
|
||||||
|
|
||||||
// Flag Support
|
// Flag Support
|
||||||
|
|
Loading…
Reference in a new issue