summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--absl/base/attributes.h7
-rw-r--r--absl/strings/string_view.h10
-rwxr-xr-xcreate_lts.py15
3 files changed, 21 insertions, 11 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h
index cf2cb550..4a8581e1 100644
--- a/absl/base/attributes.h
+++ b/absl/base/attributes.h
@@ -524,6 +524,13 @@
// ABSL_ATTRIBUTE_UNUSED
//
// Prevents the compiler from complaining about variables that appear unused.
+//
+// For code or headers that are assured to only build with C++17 and up, prefer
+// just using the standard '[[maybe_unused]]' directly over this macro.
+//
+// Due to differences in positioning requirements between the old, compiler
+// specific __attribute__ syntax and the now standard [[maybe_unused]], this
+// macro does not attempt to take advantage of '[[maybe_unused]]'.
#if ABSL_HAVE_ATTRIBUTE(unused) || (defined(__GNUC__) && !defined(__clang__))
#undef ABSL_ATTRIBUTE_UNUSED
#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
diff --git a/absl/strings/string_view.h b/absl/strings/string_view.h
index 5260b5b7..b276bdba 100644
--- a/absl/strings/string_view.h
+++ b/absl/strings/string_view.h
@@ -398,12 +398,10 @@ class string_view {
// string_view::compare()
//
- // Performs a lexicographical comparison between the `string_view` and
- // another `absl::string_view`, returning -1 if `this` is less than, 0 if
- // `this` is equal to, and 1 if `this` is greater than the passed string
- // view. Note that in the case of data equality, a further comparison is made
- // on the respective sizes of the two `string_view`s to determine which is
- // smaller, equal, or greater.
+ // Performs a lexicographical comparison between this `string_view` and
+ // another `string_view` `x`, returning a negative value if `*this` is less
+ // than `x`, 0 if `*this` is equal to `x`, and a positive value if `*this`
+ // is greater than `x`.
constexpr int compare(string_view x) const noexcept {
return CompareImpl(length_, x.length_,
Min(length_, x.length_) == 0
diff --git a/create_lts.py b/create_lts.py
index a98c76b4..302812ad 100755
--- a/create_lts.py
+++ b/create_lts.py
@@ -108,11 +108,16 @@ def main(argv):
'project(absl LANGUAGES CXX)':
'project(absl LANGUAGES CXX VERSION {})'.format(datestamp)
})
- # Set the SOVERSION to YYYYMMDD.0.0 - The first 0 means we only have
- # ABI compatible changes, and the second 0 means we can increment it
- # to mark changes as ABI-compatible, for patch releases.
- ReplaceStringsInFile('CMake/AbseilHelpers.cmake',
- {'SOVERSION 0': 'SOVERSION "{}.0.0"'.format(datestamp)})
+ # Set the SOVERSION to YYMM.0.0 - The first 0 means we only have ABI
+ # compatible changes, and the second 0 means we can increment it to
+ # mark changes as ABI-compatible, for patch releases. Note that we
+ # only use the last two digits of the year and the month because the
+ # MacOS linker requires the first part of the SOVERSION to fit into
+ # 16 bits.
+ # https://www.sicpers.info/2013/03/how-to-version-a-mach-o-library/
+ ReplaceStringsInFile(
+ 'CMake/AbseilHelpers.cmake',
+ {'SOVERSION 0': 'SOVERSION "{}.0.0"'.format(datestamp[2:6])})
StripContentBetweenTags('CMakeLists.txt', '# absl:lts-remove-begin',
'# absl:lts-remove-end')