fix(*): fix ambiguity in NAMESPACE_PRIVATE when expanding macros

This commit is contained in:
Redstone1024 2024-12-19 21:53:04 +08:00
parent 566052c8c2
commit 7fb116c577
3 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ NAMESPACE_PRIVATE_END
#define VARARGS_ACCESS_COPY(ContextName, ContextSource) NAMESPACE_STD::va_list ContextName; va_copy(ContextName, ContextSource)
/** Accesses the next variadic function argument. */
#define VARARGS_ACCESS(ContextName, Type) (NAMESPACE_PRIVATE::VarArgsAssert<Type>, va_arg(ContextName, Type))
#define VARARGS_ACCESS(ContextName, Type) (NAMESPACE_REDCRAFT::NAMESPACE_PRIVATE::VarArgsAssert<Type>, va_arg(ContextName, Type))
/** Ends traversal of the variadic function arguments. */
#define VARARGS_ACCESS_END(ContextName) va_end(ContextName)

View File

@ -57,7 +57,7 @@ struct TLiteral<u32char>
NAMESPACE_PRIVATE_END
/** Templated literal struct to allow selection of string literals based on the character type provided, and not on compiler switches. */
#define LITERAL(CharType, StringLiteral) NAMESPACE_PRIVATE::TLiteral<CharType>::Select(TEXT(StringLiteral), WTEXT(StringLiteral), U8TEXT(StringLiteral), U16TEXT(StringLiteral), U32TEXT(StringLiteral))
#define LITERAL(CharType, StringLiteral) NAMESPACE_REDCRAFT::NAMESPACE_PRIVATE::TLiteral<CharType>::Select(TEXT(StringLiteral), WTEXT(StringLiteral), U8TEXT(StringLiteral), U16TEXT(StringLiteral), U32TEXT(StringLiteral))
static_assert(CUnsigned<u8char>, "TChar assumes u8char is an unsigned integer");
static_assert(CUnsigned<u16char>, "TChar assumes u16char is an unsigned integer");

View File

@ -17,7 +17,7 @@ NAMESPACE_REDCRAFT_BEGIN
NAMESPACE_MODULE_BEGIN(Redcraft)
NAMESPACE_MODULE_BEGIN(Utility)
// @TODO: Refactor the conversion tool by more elegant way.
// TODO: Refactor the conversion tool by more elegant way.
// The conversion tool uses a string to describe the object format.
//