Changes imported from Abseil "staging" branch:
- d79c005bda08783cd496c41dbd51a5d7e520c9e2 Fix typo in ByLength example (comment). by Abseil Team <absl-team@google.com> - 0751d4f0e61f70e50f4771ca9843bd90895ec0bc Enable RAW_LOG on NaCl via POSIX write(), which it suppor... by Abseil Team <absl-team@google.com> - 4a63f87b9b1c9d738da21fc0ffa638876a12facf Remove use of assert() in .h and .inc files to reduce cha... by Alex Strelnikov <strel@google.com> GitOrigin-RevId: d79c005bda08783cd496c41dbd51a5d7e520c9e2 Change-Id: I0c5d064faa1b8e6b703d388af2b8957cc906dd7f
This commit is contained in:
parent
0dc82b9d55
commit
055cc7dce1
3 changed files with 2 additions and 8 deletions
|
|
@ -36,7 +36,7 @@
|
||||||
// This preprocessor token is also defined in raw_io.cc. If you need to copy
|
// This preprocessor token is also defined in raw_io.cc. If you need to copy
|
||||||
// this, consider moving both to config.h instead.
|
// this, consider moving both to config.h instead.
|
||||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
|
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
|
||||||
defined(__Fuchsia__)
|
defined(__Fuchsia__) || defined(__native_client__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -548,9 +548,6 @@ inline uint128& uint128::operator^=(uint128 other) {
|
||||||
// Arithmetic operators.
|
// Arithmetic operators.
|
||||||
|
|
||||||
inline uint128 operator<<(uint128 lhs, int amount) {
|
inline uint128 operator<<(uint128 lhs, int amount) {
|
||||||
assert(amount >= 0); // Negative shifts are undefined.
|
|
||||||
assert(amount < 128); // Shifts of >= 128 are undefined.
|
|
||||||
|
|
||||||
// uint64_t shifts of >= 64 are undefined, so we will need some
|
// uint64_t shifts of >= 64 are undefined, so we will need some
|
||||||
// special-casing.
|
// special-casing.
|
||||||
if (amount < 64) {
|
if (amount < 64) {
|
||||||
|
|
@ -565,9 +562,6 @@ inline uint128 operator<<(uint128 lhs, int amount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint128 operator>>(uint128 lhs, int amount) {
|
inline uint128 operator>>(uint128 lhs, int amount) {
|
||||||
assert(amount >= 0); // Negative shifts are undefined.
|
|
||||||
assert(amount < 128); // Shifts of >= 128 are undefined.
|
|
||||||
|
|
||||||
// uint64_t shifts of >= 64 are undefined, so we will need some
|
// uint64_t shifts of >= 64 are undefined, so we will need some
|
||||||
// special-casing.
|
// special-casing.
|
||||||
if (amount < 64) {
|
if (amount < 64) {
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ class ByAnyChar {
|
||||||
// using absl::ByLength;
|
// using absl::ByLength;
|
||||||
// std::vector<std::string> v = absl::StrSplit("12345", ByLength(2));
|
// std::vector<std::string> v = absl::StrSplit("12345", ByLength(2));
|
||||||
//
|
//
|
||||||
// // v[0] == "12", v[1] == "35", v[2] == "5"
|
// // v[0] == "12", v[1] == "34", v[2] == "5"
|
||||||
class ByLength {
|
class ByLength {
|
||||||
public:
|
public:
|
||||||
explicit ByLength(ptrdiff_t length);
|
explicit ByLength(ptrdiff_t length);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue