about summary refs log tree commit diff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/memory/BUILD.bazel5
-rw-r--r--absl/memory/memory.h1
-rw-r--r--absl/numeric/int128.h12
-rw-r--r--absl/strings/match.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/absl/memory/BUILD.bazel b/absl/memory/BUILD.bazel
index 7265693f121e..d5c62265a8c5 100644
--- a/absl/memory/BUILD.bazel
+++ b/absl/memory/BUILD.bazel
@@ -28,7 +28,10 @@ cc_library(
     name = "memory",
     hdrs = ["memory.h"],
     copts = ABSL_DEFAULT_COPTS,
-    deps = ["//absl/meta:type_traits"],
+    deps = [
+        "//absl/base:core_headers",
+        "//absl/meta:type_traits",
+    ],
 )
 
 cc_test(
diff --git a/absl/memory/memory.h b/absl/memory/memory.h
index 15cd85f4e1ed..22d44b9e46fe 100644
--- a/absl/memory/memory.h
+++ b/absl/memory/memory.h
@@ -30,6 +30,7 @@
 #include <type_traits>
 #include <utility>
 
+#include "absl/base/macros.h"
 #include "absl/meta/type_traits.h"
 
 namespace absl {
diff --git a/absl/numeric/int128.h b/absl/numeric/int128.h
index a2ca29a03ad9..8eca1e926821 100644
--- a/absl/numeric/int128.h
+++ b/absl/numeric/int128.h
@@ -159,12 +159,12 @@ class alignas(16) uint128 {
   // Uint128Low64()
   //
   // Returns the lower 64-bit value of a `uint128` value.
-  friend uint64_t Uint128Low64(const uint128& v);
+  friend constexpr uint64_t Uint128Low64(const uint128& v);
 
   // Uint128High64()
   //
   // Returns the higher 64-bit value of a `uint128` value.
-  friend uint64_t Uint128High64(const uint128& v);
+  friend constexpr uint64_t Uint128High64(const uint128& v);
 
   // MakeUInt128()
   //
@@ -202,10 +202,6 @@ extern std::ostream& operator<<(std::ostream& o, const uint128& b);
 
 // TODO(strel) add operator>>(std::istream&, uint128&)
 
-// Methods to access low and high pieces of 128-bit value.
-uint64_t Uint128Low64(const uint128& v);
-uint64_t Uint128High64(const uint128& v);
-
 // TODO(absl-team): Implement signed 128-bit type
 
 // --------------------------------------------------------------------------
@@ -283,9 +279,9 @@ inline uint128 operator%(const uint128& lhs, const uint128& rhs) {
   return uint128(lhs) %= rhs;
 }
 
-inline uint64_t Uint128Low64(const uint128& v) { return v.lo_; }
+constexpr uint64_t Uint128Low64(const uint128& v) { return v.lo_; }
 
-inline uint64_t Uint128High64(const uint128& v) { return v.hi_; }
+constexpr uint64_t Uint128High64(const uint128& v) { return v.hi_; }
 
 // Constructors from integer types.
 
diff --git a/absl/strings/match.h b/absl/strings/match.h
index 3d54da81d5f0..6005533c992a 100644
--- a/absl/strings/match.h
+++ b/absl/strings/match.h
@@ -25,7 +25,7 @@
 // Examples:
 //   std::string s = "foo";
 //   absl::string_view sv = "f";
-//   EXPECT_TRUE(absl::StrContains(s, sv));
+//   assert(absl::StrContains(s, sv));
 //
 // Note: The order of parameters in these functions is designed to mimic the
 // order an equivalent member function would exhibit;