8484// namespace absl {
8585// OTABSL_NAMESPACE_BEGIN
8686//
87- // void Foo(); // absl::Foo().
87+ // void Foo(); // absl::OTABSL_OPTION_NAMESPACE_NAME:: Foo().
8888//
8989// OTABSL_NAMESPACE_END
9090// } // namespace absl
9494// not support forward declarations of its own types, nor does it support
9595// user-provided specialization of Abseil templates. Code that violates these
9696// rules may be broken without warning.)
97- #if !defined(OTABSL_OPTION_USE_INLINE_NAMESPACE) || \
98- !defined (OTABSL_OPTION_INLINE_NAMESPACE_NAME)
97+ #if !defined(OTABSL_OPTION_NAMESPACE_NAME)
9998#error options.h is misconfigured.
10099#endif
101100
102- // Check that OTABSL_OPTION_INLINE_NAMESPACE_NAME is neither "head" nor ""
103- #if defined(__cplusplus) && OTABSL_OPTION_USE_INLINE_NAMESPACE == 1
101+ // Check that OTABSL_OPTION_NAMESPACE_NAME is neither "head" nor ""
102+ #if defined(__cplusplus)
104103
105104#define OTABSL_INTERNAL_INLINE_NAMESPACE_STR \
106- OTABSL_INTERNAL_TOKEN_STR (OTABSL_OPTION_INLINE_NAMESPACE_NAME )
105+ OTABSL_INTERNAL_TOKEN_STR (OTABSL_OPTION_NAMESPACE_NAME )
107106
108107static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0 ] != ' \0 ' ,
109- " options.h misconfigured: OTABSL_OPTION_INLINE_NAMESPACE_NAME must "
108+ " options.h misconfigured: OTABSL_OPTION_NAMESPACE_NAME must "
110109 " not be empty." );
111110static_assert (OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0 ] != ' h' ||
112111 OTABSL_INTERNAL_INLINE_NAMESPACE_STR[1 ] != ' e' ||
113112 OTABSL_INTERNAL_INLINE_NAMESPACE_STR[2 ] != ' a' ||
114113 OTABSL_INTERNAL_INLINE_NAMESPACE_STR[3 ] != ' d' ||
115114 OTABSL_INTERNAL_INLINE_NAMESPACE_STR[4 ] != ' \0 ' ,
116- " options.h misconfigured: OTABSL_OPTION_INLINE_NAMESPACE_NAME must "
115+ " options.h misconfigured: OTABSL_OPTION_NAMESPACE_NAME must "
117116 " be changed to a new, unique identifier name." );
118117
119118#endif
120119
121- #if OTABSL_OPTION_USE_INLINE_NAMESPACE == 0
122- #define OTABSL_NAMESPACE_BEGIN
123- #define OTABSL_NAMESPACE_END
124- #elif OTABSL_OPTION_USE_INLINE_NAMESPACE == 1
125- #define OTABSL_NAMESPACE_BEGIN \
126- inline namespace OTABSL_OPTION_INLINE_NAMESPACE_NAME {
120+
121+ #define OTABSL_NAMESPACE_BEGIN namespace OTABSL_OPTION_NAMESPACE_NAME {
127122#define OTABSL_NAMESPACE_END }
128- #else
129- #error options.h is misconfigured.
130- #endif
131123
132124// -----------------------------------------------------------------------------
133125// Compiler Feature Checks
@@ -217,7 +209,7 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
217209
218210// OTABSL_HAVE_SOURCE_LOCATION_CURRENT
219211//
220- // Indicates whether `absl::SourceLocation::current()` will return useful
212+ // Indicates whether `absl::OTABSL_OPTION_NAMESPACE_NAME:: SourceLocation::current()` will return useful
221213// information in some contexts.
222214#ifndef OTABSL_HAVE_SOURCE_LOCATION_CURRENT
223215#if OTABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \
@@ -570,7 +562,7 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
570562
571563// OTABSL_USES_STD_ANY
572564//
573- // Indicates whether absl::any is an alias for std::any.
565+ // Indicates whether absl::OTABSL_OPTION_NAMESPACE_NAME:: any is an alias for std::any.
574566#if !defined(OTABSL_OPTION_USE_STD_ANY)
575567#error options.h is misconfigured.
576568#elif OTABSL_OPTION_USE_STD_ANY == 0 || \
@@ -585,7 +577,7 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
585577
586578// OTABSL_USES_STD_OPTIONAL
587579//
588- // Indicates whether absl::optional is an alias for std::optional.
580+ // Indicates whether absl::OTABSL_OPTION_NAMESPACE_NAME:: optional is an alias for std::optional.
589581#if !defined(OTABSL_OPTION_USE_STD_OPTIONAL)
590582#error options.h is misconfigured.
591583#elif OTABSL_OPTION_USE_STD_OPTIONAL == 0 || \
@@ -600,7 +592,7 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
600592
601593// OTABSL_USES_STD_VARIANT
602594//
603- // Indicates whether absl::variant is an alias for std::variant.
595+ // Indicates whether absl::OTABSL_OPTION_NAMESPACE_NAME:: variant is an alias for std::variant.
604596#if !defined(OTABSL_OPTION_USE_STD_VARIANT)
605597#error options.h is misconfigured.
606598#elif OTABSL_OPTION_USE_STD_VARIANT == 0 || \
@@ -615,7 +607,7 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
615607
616608// OTABSL_USES_STD_STRING_VIEW
617609//
618- // Indicates whether absl::string_view is an alias for std::string_view.
610+ // Indicates whether absl::OTABSL_OPTION_NAMESPACE_NAME:: string_view is an alias for std::string_view.
619611#if !defined(OTABSL_OPTION_USE_STD_STRING_VIEW)
620612#error options.h is misconfigured.
621613#elif OTABSL_OPTION_USE_STD_STRING_VIEW == 0 || \
@@ -650,15 +642,10 @@ static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
650642// the proper count to skip past the CCTZ fork namespace names. (This number
651643// is one larger when there is an inline namespace name to skip.)
652644#if defined(_MSC_VER)
653- #if OTABSL_OPTION_USE_INLINE_NAMESPACE == 0
654- #define OTABSL_INTERNAL_MANGLED_NS " absl"
655- #define OTABSL_INTERNAL_MANGLED_BACKREFERENCE " 5"
656- #else
657645#define OTABSL_INTERNAL_MANGLED_NS \
658- OTABSL_INTERNAL_TOKEN_STR (OTABSL_OPTION_INLINE_NAMESPACE_NAME ) "@absl"
646+ OTABSL_INTERNAL_TOKEN_STR (OTABSL_OPTION_NAMESPACE_NAME ) "@absl"
659647#define OTABSL_INTERNAL_MANGLED_BACKREFERENCE " 6"
660648#endif
661- #endif
662649
663650#undef OTABSL_INTERNAL_HAS_KEYWORD
664651
0 commit comments