Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #1789: Add missing #ifdef pp directive to the TypeName() function …
…in the layout.h Imported from GitHub PR #1789 If code is being compiled without support for the RTTI, ABSL_INTERNAL_HAS_RTTI pp macro is not defined in the absl/base/config.h (otherwise, if RTTI is supported, it is defined to 1) Rn this macro is used in the absl/flags/internal/flag.h, absl/flags/internal/flag.cc, absl/types/any.h and absl/container/internal/layout.h. In the first three files it is used like `#ifdef ABSL_INTERNAL_HAS_RTTI`. In the layout.h it is used like `#if ABSL_INTERNAL_HAS_RTTI` which causes trouble if code that uses absl is being compiled with the Wundef warning flag (at least when gcc or clang are used) Since ABSL_INTERNAL_HAS_RTTI is not defined when RTTI is not used, it seems like it should be used as `#ifdef ABSL_INTERNAL_HAS_RTTI` in the layout.h Merge 437e7c1 into c7cf999 Merging this change closes #1789 COPYBARA_INTEGRATE_REVIEW=#1789 from i80287:add-missing-ifdef 437e7c1 PiperOrigin-RevId: 702377421 Change-Id: I3241b573d496adba4870c8e4742c3ee759841721
- Loading branch information