From cad715dbf375a336fcb0b2b0ef57fc2b7a1b0b4b Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 30 Nov 2021 14:02:51 -0800 Subject: Export of internal Abseil changes -- e2a571b818faaec4185426a8cf71fd2970674423 by Matt Kulukundis : Fix missed use of old RTTI macro PiperOrigin-RevId: 413239579 -- e3c15a3fe0a4e44d6e08d69ad912b2245a403bd6 by Derek Mauro : Makes erase_if return the number of erased elements for compatibility with C++20 https://en.cppreference.com/w/cpp/container/unordered_map/erase_if This may technically be an API break, but no actual breaks were found in Google code. Fixes to open source code should be trivial. Closes #1065 PiperOrigin-RevId: 413204392 -- c1fb1ddbc2def3f3d177e5b80b9934bdbb7b16fc by Matt Kulukundis : Consolidate to a single HAS_RTTI macro PiperOrigin-RevId: 413169336 GitOrigin-RevId: e2a571b818faaec4185426a8cf71fd2970674423 Change-Id: I74b78ebd5fc172e3f5fcbd13a58cf53f7b250ae9 --- absl/flags/internal/flag.cc | 2 +- absl/flags/internal/flag.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'absl/flags/internal') diff --git a/absl/flags/internal/flag.cc b/absl/flags/internal/flag.cc index 1515022d..7102559e 100644 --- a/absl/flags/internal/flag.cc +++ b/absl/flags/internal/flag.cc @@ -205,7 +205,7 @@ void FlagImpl::AssertValidType(FlagFastTypeId rhs_type_id, if (lhs_runtime_type_id == rhs_runtime_type_id) return; -#if defined(ABSL_FLAGS_INTERNAL_HAS_RTTI) +#ifdef ABSL_INTERNAL_HAS_RTTI if (*lhs_runtime_type_id == *rhs_runtime_type_id) return; #endif diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h index 124a2f1c..2d0a7e9c 100644 --- a/absl/flags/internal/flag.h +++ b/absl/flags/internal/flag.h @@ -163,7 +163,7 @@ inline ptrdiff_t ValueOffset(FlagOpFn op) { // Returns an address of RTTI's typeid(T). template inline const std::type_info* GenRuntimeTypeId() { -#if defined(ABSL_FLAGS_INTERNAL_HAS_RTTI) +#ifdef ABSL_INTERNAL_HAS_RTTI return &typeid(T); #else return nullptr; -- cgit v1.2.3