Allow literal separators (') in integral/floating constants.
This was a popular request in
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/zsGhgaKLmIk .
BUG=none
TEST=none
Change-Id: I9195ce31dff0b945741ff38fd7c3b8cb69ebfd8c
Reviewed-on: https://chromium-review.googlesource.com/857804
Reviewed-by: Jeremy Roman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#529625}
diff --git a/base/guid.cc b/base/guid.cc
index 45dd209c..2a23658 100644
--- a/base/guid.cc
+++ b/base/guid.cc
@@ -51,13 +51,13 @@
// where y is one of [8, 9, A, B].
// Clear the version bits and set the version to 4:
- sixteen_bytes[0] &= 0xffffffffffff0fffULL;
- sixteen_bytes[0] |= 0x0000000000004000ULL;
+ sixteen_bytes[0] &= 0xffffffff'ffff0fffULL;
+ sixteen_bytes[0] |= 0x00000000'00004000ULL;
// Set the two most significant bits (bits 6 and 7) of the
// clock_seq_hi_and_reserved to zero and one, respectively:
- sixteen_bytes[1] &= 0x3fffffffffffffffULL;
- sixteen_bytes[1] |= 0x8000000000000000ULL;
+ sixteen_bytes[1] &= 0x3fffffff'ffffffffULL;
+ sixteen_bytes[1] |= 0x80000000'00000000ULL;
return RandomDataToGUIDString(sixteen_bytes);
}
@@ -76,7 +76,7 @@
static_cast<unsigned int>((bytes[0] >> 16) & 0x0000ffff),
static_cast<unsigned int>(bytes[0] & 0x0000ffff),
static_cast<unsigned int>(bytes[1] >> 48),
- bytes[1] & 0x0000ffffffffffffULL);
+ bytes[1] & 0x0000ffff'ffffffffULL);
}
} // namespace base