From 930fbec75b452af8bb8c796f5bb754e953e29cf5 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 2 Sep 2020 08:15:12 -0700 Subject: Export of internal Abseil changes -- ea5599482a5120800f060c6d41334dbdbabc3941 by Mark Barolak : Import of CCTZ from GitHub. PiperOrigin-RevId: 329715235 -- e897a582bed3aff509b98e5da0711b2afd15ed17 by Tom Manshreck : * Update Status with overview * Move public API helper functions out of "Implementation Details" * Add documentation to Status Codes PiperOrigin-RevId: 329595541 -- f93b28596f24fa005606565e0a8a4dabe260b01c by Abseil Team : Fix -Wextra-semi issues. ABSL_COMPARE_INLINE_xxx_DECL may expand to nothing. That produces structs that have only semicolon inside class declaration. such struct is not a valid c++ code and fails to compile when -Wextra-semi is turned on. PiperOrigin-RevId: 329564534 GitOrigin-RevId: ea5599482a5120800f060c6d41334dbdbabc3941 Change-Id: Icc9944c3ec8303abc26a167c2ba7c91e59a4877f --- absl/types/compare.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'absl/types/compare.h') diff --git a/absl/types/compare.h b/absl/types/compare.h index 62ca70f9..19b076e7 100644 --- a/absl/types/compare.h +++ b/absl/types/compare.h @@ -86,7 +86,8 @@ enum class ncmp : value_type { unordered = -127 }; // incomplete types so they need to be defined after the types are complete. #ifdef __cpp_inline_variables -#define ABSL_COMPARE_INLINE_BASECLASS_DECL(name) +// A no-op expansion that can be followed by a semicolon at class level. +#define ABSL_COMPARE_INLINE_BASECLASS_DECL(name) static_assert(true, "") #define ABSL_COMPARE_INLINE_SUBCLASS_DECL(type, name) \ static const type name @@ -99,7 +100,8 @@ enum class ncmp : value_type { unordered = -127 }; #define ABSL_COMPARE_INLINE_BASECLASS_DECL(name) \ ABSL_CONST_INIT static const T name -#define ABSL_COMPARE_INLINE_SUBCLASS_DECL(type, name) +// A no-op expansion that can be followed by a semicolon at class level. +#define ABSL_COMPARE_INLINE_SUBCLASS_DECL(type, name) static_assert(true, "") #define ABSL_COMPARE_INLINE_INIT(type, name, init) \ template \ -- cgit v1.2.3