[*] Cosmetics

[*] AuCodepointsXXXWithEqualIgnoreCase -> AuCodepointsXXXWithIgnoreCase
This commit is contained in:
Reece Wilson 2024-10-13 08:49:59 +01:00
parent f7722a1b1c
commit 82576068f3
16 changed files with 363 additions and 300 deletions

View File

@ -205,48 +205,73 @@
#define AU_EOB_UNLIKELY
#endif
// AU_INLINE - inline a function, not C++ linkage. AU_INLINE is a C inline / forceinline / always_inline
// auline - "inline" "forceinline" etc tokens are ambiguous in the world of C/C++ headers. auline is a C inline / forceinline / always_inline
// AU_INLINE_XX - C++ inline linkage after XX revision
// AU_CONSTEXPR_XX - C++ constexpr after XX revision
// AU_INLINE_OR_STATIC_XX - C++ inline linkage after XX revision, otherwise use static. Intended for pre-C++17 inlines w/ duplicate symbols.
// AU_OPTIMIZED - Inline (forceinline / always_inline) into caller function or emit noninternalized symbol in the object of the translation unit. In the latter case, we should get some simple leaf function emitted into .code memory nearby, and perhaps the optimizer pass will take care it.
//
// yay, more confusion over what "inline" actually means
#define AU_OPTIMIZED static auline
// ps:
// we wont add __attribute__((optimize(...)) macros
// most compilers treat them as file level options; no per function attributes override this.
// AU_OPTIMIZED doesn't mean -Ourmom optimization. see above.
#if defined(AU_LANG_CPP_14_)
#define AU_CONSTEXPR_14 AUROXTL_CONSTEXPR
#define AU_INLINE_14 inline
#define AU_CONSTEXPR_14 AUROXTL_CONSTEXPR
#define AU_INLINE_14 inline
#define AU_INLINE_OR_STATIC_14 inline
#define AU_INLINE_CONSTEXPR_14 AU_OPTIMIZED AU_CONSTEXPR_14
#define AU_STATIC_CONSTEXPR_14 static AU_CONSTEXPR_14
#else
#define AU_CONSTEXPR_14
#define AU_INLINE_14
#define AU_INLINE_OR_STATIC_14 static
#define AU_INLINE_CONSTEXPR_14 AU_OPTIMIZED
#define AU_STATIC_CONSTEXPR_14 static
#endif
#if defined(AU_LANG_CPP_17_)
#define AU_CONSTEXPR_17 AUROXTL_CONSTEXPR
#define AU_INLINE_17 inline
#define AU_CONSTEXPR_17 AUROXTL_CONSTEXPR
#define AU_INLINE_CONSTEXPR_17 AU_OPTIMIZED AU_CONSTEXPR_17
#define AU_STATIC_CONSTEXPR_17 static AU_CONSTEXPR_17
#define AU_INLINE_17 inline
#define AU_INLINE_OR_STATIC_17 inline
#undef AU_CONSTEXPR_14
#define AU_CONSTEXPR_14 AUROXTL_CONSTEXPR
#define AU_CONSTEXPR_14 AUROXTL_CONSTEXPR
#undef AU_INLINE_14
#define AU_INLINE_14 inline
#define AU_INLINE_14 inline
#undef AU_INLINE_OR_STATIC_14
#define AU_INLINE_OR_STATIC_14 inline
#else
#define AU_CONSTEXPR_17
#define AU_INLINE_17
#define AU_INLINE_OR_STATIC_17 static
#define AU_INLINE_CONSTEXPR_17 AU_OPTIMIZED
#define AU_STATIC_CONSTEXPR_17 static
#endif
#if defined(AU_LANG_CPP_20_)
#define AU_CONSTEXPR_20 AUROXTL_CONSTEXPR
#define AU_INLINE_20 inline
#define AU_INLINE_OR_STATIC_20 inline
#define AU_CONSTEXPR_20 AUROXTL_CONSTEXPR
#define AU_INLINE_20 inline
#undef AU_CONSTEXPR_17
#define AU_CONSTEXPR_17 AUROXTL_CONSTEXPR
#define AU_CONSTEXPR_17 AUROXTL_CONSTEXPR
#undef AU_INLINE_17
#define AU_INLINE_17 inline
#define AU_INLINE_17 inline
#undef AU_INLINE_OR_STATIC_17
#define AU_INLINE_OR_STATIC_17 inline
#else
#define AU_CONSTEXPR_20
#define AU_INLINE_20
#define AU_INLINE_OR_STATIC_20 static
#endif
#define AU_INLINE_OR_STATIC_20 AU_INLINE_OR_STATIC_17
#define AU_INLINE_CONSTEXPR_20 AU_INLINE_CONSTEXPR_17
#define AU_STATIC_CONSTEXPR_20 AU_STATIC_CONSTEXPR_17
#define AUROXTL_CONSTEXPR_14 AU_CONSTEXPR_14
#define AUROXTL_CONSTEXPR_17 AU_CONSTEXPR_17
#define AUROXTL_CONSTEXPR_20 AU_CONSTEXPR_20

View File

@ -12,127 +12,127 @@ namespace __audetail
template <class T>
struct AuHasSetAllocatorRawVoid
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuHeap *)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuHeap *)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetAllocatorRawBool
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuHeap *)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuHeap *)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapRawVoid
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuHeap *)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuHeap *)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapRawBool
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuHeap *)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuHeap *)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetAllocatorSVoid
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetAllocatorSBool
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetAllocator)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetAllocator)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapSVoid
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapSBool
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeap)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeap)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapSharedSVoid
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeapShared)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeapShared)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeapShared)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<void (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeapShared)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasSetHeapSharedSBool
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeapShared)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeapShared)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(AuSPtr<AuHeap>)>(&C::SetHeapShared)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<bool (C:: *)(const AuSPtr<AuHeap> &)>(&C::SetHeapShared)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasAllocatorType
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(typename C::allocator_type *);
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(typename C::allocator_type *);
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetAllocatorRawVoid_v = AuHasSetAllocatorRawVoid<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetAllocatorRawVoid_v = AuHasSetAllocatorRawVoid<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetAllocatorRawBool_v = AuHasSetAllocatorRawBool<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetAllocatorRawBool_v = AuHasSetAllocatorRawBool<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetAllocatorSharedVoid_v = AuHasSetAllocatorSVoid<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetAllocatorSharedVoid_v = AuHasSetAllocatorSVoid<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetAllocatorSharedBool_v = AuHasSetAllocatorSBool<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetAllocatorSharedBool_v = AuHasSetAllocatorSBool<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapRawVoid_v = AuHasSetHeapRawVoid<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapRawVoid_v = AuHasSetHeapRawVoid<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapRawBool_v = AuHasSetHeapRawBool<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapRawBool_v = AuHasSetHeapRawBool<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapSharedVoid_v = AuHasSetHeapSVoid<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapSharedVoid_v = AuHasSetHeapSVoid<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapSharedBool_v = AuHasSetHeapSBool<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapSharedBool_v = AuHasSetHeapSBool<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapSharedSharedVoid_v = AuHasSetHeapSharedSVoid<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapSharedSharedVoid_v = AuHasSetHeapSharedSVoid<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasSetHeapSharedSharedBool_v = AuHasSetHeapSharedSBool<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasSetHeapSharedSharedBool_v = AuHasSetHeapSharedSBool<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasAllocatorType_v = AuHasAllocatorType<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasAllocatorType_v = AuHasAllocatorType<T>::type::value;
}
template <typename T>

View File

@ -14,35 +14,35 @@ namespace AuUtil
template <class T>
struct AuHasDestroy
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::DestroyPrivate));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::DestroyPrivate));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasDeconstruct
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::DeconstructPrivate));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::DeconstructPrivate));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
struct AuHasPreDeconstruct
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::PreDeconstructPrivate));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::PreDeconstructPrivate));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasDestroy_v = AuHasDestroy<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasDestroy_v = AuHasDestroy<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasDesconstruct_v = AuHasDeconstruct<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasDesconstruct_v = AuHasDeconstruct<T>::type::value;
template <class T>
static AUROXTL_CONSTEXPR_17 bool AuHasPreDesconstruct_v = AuHasPreDeconstruct<T>::type::value;
AU_STATIC_CONSTEXPR_17 bool AuHasPreDesconstruct_v = AuHasPreDeconstruct<T>::type::value;
}
#if !defined(__ROXTL_FORCE_SAFE_DESTROY_FORCE_CLEAR)

View File

@ -21,7 +21,7 @@
AuCodepointsContains,
AuCodepointsReplaceAll, AuCodepointsSplitString (views),
AuCodepointsFindPreviousValidByteOffsetFromOffset, AuCodepointsFindPreviousValidByteOffsetFromByteOffset
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase,
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithIgnoreCase, AuCodepointsEndsWithIgnoreCase,
AuCodepointsReverseIterate, AuCodepointsReverseIterateSubStrPrefixView, AuCodepointsReverseIterateSubStrSuffixView
Warning: By codepoints, we mean UTF32.
@ -33,7 +33,7 @@
#pragma once
/// Try decode UTF32 codepoint from UTF8 sequence
static AUROXTL_CONSTEXPR_17 AuOptional<AuUInt32> AuCodepointsDecodeOne(const AuROString &in);
AU_STATIC_CONSTEXPR_17 AuOptional<AuUInt32> AuCodepointsDecodeOne(const AuROString &in);
/// Try decode all UTF32 codepoints from UTF8 sequence
static AuList<AuUInt32> AuCodepointsDecode(const AuROString &in);
@ -44,17 +44,17 @@ static void AuCodepointsEncodeInto(
/// Similar to AuCodepointsIsEqualIgnoreCase, translates all ASCII English characters to their AuToLower counterparts.
/// No localization complexities are, will, or should be involved.
static auline AuString AuCodepointsToLower(const AuROString &in);
AU_OPTIMIZED AuString AuCodepointsToLower(const AuROString &in);
/// Similar to AuCodepointsIsEqualIgnoreCase, translates all ASCII English characters to their AuToUpper counterparts.
/// No localization complexities are, will, or should be involved.
static auline AuString AuCodepointsToUpper(const AuROString &in);
AU_OPTIMIZED AuString AuCodepointsToUpper(const AuROString &in);
/// Counts the UTF8/UTF32 codepoints in a byte sequence
static auline AUROXTL_CONSTEXPR_17 CodepointOffset_t AuCodepointsCount(const AuROString &in);
AU_INLINE_CONSTEXPR_17 CodepointOffset_t AuCodepointsCount(const AuROString &in);
/// Counts the bytes required to iterate over a UTF8 encoded codepoint
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsNextLength(const AuROString &in);
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsNextLength(const AuROString &in);
/// Iterates over a UTF8 sequence using OP.
/// If op returns void, AuCodepointsForEach will continue until EOS or invalid squence.
@ -72,25 +72,25 @@ template <class T>
AuString AuCodepointsTransformASCIIOp(T op, const AuROString &in);
/// Performs a memcmp on unknown chunks, performs a memcmp for each UTF8 sequence of bytes, and performs a AuToLower(a) != AuToLower(b) operation on any ASCII English characters.
/// Also see: AuCodepointsStartsWithEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase
/// Also see: AuCodepointsStartsWithIgnoreCase, AuCodepointsEndsWithIgnoreCase
static bool AuCodepointsIsEqualIgnoreCase(const AuROString &inA,
const AuROString &inB);
/// Performs a memcmp on unknown chunks, performs a memcmp for each UTF8 sequence of bytes, and performs a AuToLower(a) != AuToLower(b) operation on any ASCII English characters.
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase
static bool AuCodepointsStartsWithEqualIgnoreCase(const AuROString &inA,
const AuROString &inB);
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsEndsWithIgnoreCase
static bool AuCodepointsStartsWithIgnoreCase(const AuROString &inA,
const AuROString &inB);
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithEqualIgnoreCase
static bool AuCodepointsEndsWithEqualIgnoreCase(const AuROString &inA,
const AuROString &inB);
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithIgnoreCase
static bool AuCodepointsEndsWithIgnoreCase(const AuROString &inA,
const AuROString &inB);
/// Returns the byte offset of the codepoint index or AuROString::npos
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteOffset(const AuROString &in,
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteOffset(const AuROString &in,
CodepointOffset_t uCodepointIndex);
/// Returns the length of the codepoint index in bytes or AuROString::npos
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteLength(const AuROString &in,
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteLength(const AuROString &in,
CodepointOffset_t uCodepointIndex);
/// Finds subpattern in value at codepoint offset, returning bool
@ -109,21 +109,21 @@ static CodepointByteOffset_t AuCodepointsFindByteOff
/// AuCodepointsFindByteOffset same as above (AuCodepointsFindByteOffset), slightly less dumb, but still too bloated.
/// The main difference is that uStartPosition is trusted to be a valid start offset.
/// Worst thing about this is, assuming a valid string view, we don't need to worry about testing the validity of the previous bytes (<uStartPosition), or even the current codepoint byte offset (uStartPosition).
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
const AuROString &find,
CodepointByteOffset_t uStartPosition);
/// An inefficient seek backwards to byte offset given an arbitrary codepoint offset.
/// Returns byte offset for codepoint offset - 1 or AuROString::npos
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromOffset(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromOffset(const AuROString &in,
CodepointOffset_t uStartPosition = {});
/// An efficient seek backwards to byte offset given an arbitrary codepoint byte offset.
/// Returns byte offset for codepoint byte offset - 1 or AuROString::npos
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromByteOffset(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromByteOffset(const AuROString &in,
CodepointByteOffset_t uStartPosition = {});
static AUROXTL_CONSTEXPR_17 CodepointOffset_t AuCodepointsFindCodepointOffset(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointOffset_t AuCodepointsFindCodepointOffset(const AuROString &in,
CodepointByteOffset_t uBytePosition);
/// Finds subpattern in value at codepoint offset, returning a codepoint offset or AuROString::npos
@ -132,13 +132,13 @@ static CodepointOffset_t AuCodepointsFindCodepoi
CodepointOffset_t uStartPosition = {});
/// For a given valid UTF8 string view, provides the delta byte offset or AuROString::npos, to delete the last most codepoint
static AUROXTL_CONSTEXPR_17 AuUInt AuCodepointsReverseIterate(const AuROString &string);
AU_STATIC_CONSTEXPR_17 AuUInt AuCodepointsReverseIterate(const AuROString &string);
/// For a given valid UTF8 string view, to delete the last most codepoint, this provides a view with the suffix removed or an empty view.
static AUROXTL_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrPrefixView(const AuROString &string);
AU_STATIC_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrPrefixView(const AuROString &string);
/// For a given valid UTF8 string view, to delete the last most codepoint, this provides a view with the just suffix to be removed or an empty view.
static AUROXTL_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrSuffixView(const AuROString &string);
AU_STATIC_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrSuffixView(const AuROString &string);
static AuString & AuCodepointsReplaceAll(AuString &str,
const AuROString &from,

View File

@ -18,7 +18,7 @@
AuCodepointsContains,
AuCodepointsReplaceAll, AuCodepointsSplitString (views),
AuCodepointsFindPreviousValidByteOffsetFromOffset, AuCodepointsFindPreviousValidByteOffsetFromByteOffset
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase,
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithIgnoreCase, AuCodepointsEndsWithIgnoreCase,
AuCodepointsReverseIterate, AuCodepointsReverseIterateSubStrPrefixView, AuCodepointsReverseIterateSubStrSuffixView
Warning: By codepoints, we mean UTF32.
@ -30,7 +30,7 @@
#pragma once
/// Try decode UTF32 codepoint from UTF8 sequence
static AUROXTL_CONSTEXPR_17 AuOptional<AuUInt32> AuCodepointsDecodeOne(const AuROString &in)
AU_STATIC_CONSTEXPR_17 AuOptional<AuUInt32> AuCodepointsDecodeOne(const AuROString &in)
{
if (in.empty())
{
@ -227,20 +227,20 @@ static void AuCodepointsEncodeInto(AuUInt32 uCodepoin
/// Similar to AuCodepointsIsEqualIgnoreCase, translates all ASCII English characters to their AuToLower counterparts.
/// No localization complexities are, will, or should be involved.
static auline AuString AuCodepointsToLower(const AuROString &in)
AU_OPTIMIZED AuString AuCodepointsToLower(const AuROString &in)
{
return AuCodepointsTransformASCIIOp(((char(*)(char)) & AuToLower), in);
}
/// Similar to AuCodepointsIsEqualIgnoreCase, translates all ASCII English characters to their AuToUpper counterparts.
/// No localization complexities are, will, or should be involved.
static auline AuString AuCodepointsToUpper(const AuROString &in)
AU_OPTIMIZED AuString AuCodepointsToUpper(const AuROString &in)
{
return AuCodepointsTransformASCIIOp(((char(*)(char)) & AuToUpper), in);
}
/// Counts the UTF8/UTF32 codepoints in a byte sequence
static auline AUROXTL_CONSTEXPR_17 CodepointOffset_t AuCodepointsCount(const AuROString &in)
AU_INLINE_CONSTEXPR_17 CodepointOffset_t AuCodepointsCount(const AuROString &in)
{
CodepointOffset_t uCounter {};
auto uLength = in.length();
@ -323,7 +323,7 @@ static auline AUROXTL_CONSTEXPR_17 CodepointOffset_t AuCodepointsCount(const
}
/// Counts the bytes required to iterate over a UTF8 encoded codepoint
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsNextLength(const AuROString &in)
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsNextLength(const AuROString &in)
{
if (in.length())
{
@ -640,7 +640,7 @@ AuString AuCodepointsTransformASCIIOp(T op, const
}
/// Performs a memcmp on unknown chunks, performs a memcmp for each UTF8 sequence of bytes, and performs a AuToLower(a) != AuToLower(b) operation on any ASCII English characters.
/// Also see: AuCodepointsStartsWithEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase
/// Also see: AuCodepointsStartsWithIgnoreCase, AuCodepointsEndsWithIgnoreCase
static bool AuCodepointsIsEqualIgnoreCase(const AuROString &inA,
const AuROString &inB)
{
@ -709,9 +709,9 @@ static bool AuCodepointsIsEqualIgnoreCase(const AuROS
}
/// Performs a memcmp on unknown chunks, performs a memcmp for each UTF8 sequence of bytes, and performs a AuToLower(a) != AuToLower(b) operation on any ASCII English characters.
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase
static bool AuCodepointsStartsWithEqualIgnoreCase(const AuROString &inA,
const AuROString &inB)
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsEndsWithIgnoreCase
static bool AuCodepointsStartsWithIgnoreCase(const AuROString &inA,
const AuROString &inB)
{
if (inA.size() < inB.size())
{
@ -777,8 +777,8 @@ static bool AuCodepointsStartsWithEqualIgnoreCase(con
return true;
}
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithEqualIgnoreCase
static bool AuCodepointsEndsWithEqualIgnoreCase(const AuROString &inA,
/// Also see: AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithIgnoreCase
static bool AuCodepointsEndsWithIgnoreCase(const AuROString &inA,
const AuROString &inB)
{
if (inA.size() < inB.size())
@ -841,7 +841,7 @@ static bool AuCodepointsEndsWithEqualIgnoreCase(const
}
/// Returns the byte offset of the codepoint index or AuROString::npos
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteOffset(const AuROString &in,
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteOffset(const AuROString &in,
CodepointOffset_t uCodepointIndex)
{
AuUInt uCounter {};
@ -931,7 +931,7 @@ static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteOffs
}
/// Returns the length of the codepoint index in bytes or AuROString::npos
static auline AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteLength(const AuROString &in,
AU_INLINE_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsGetByteLength(const AuROString &in,
CodepointOffset_t uCodepointIndex)
{
AuUInt uCounter {};
@ -1131,7 +1131,7 @@ static CodepointByteOffset_t AuCodepointsFindByteOffset(const AuROStri
/// AuCodepointsFindByteOffset same as above (AuCodepointsFindByteOffset), slightly less dumb, but still too bloated.
/// The main difference is that uStartPosition is trusted to be a valid start offset.
/// Worst thing about this is, assuming a valid string view, we don't need to worry about testing the validity of the previous bytes (<uStartPosition), or even the current codepoint byte offset (uStartPosition).
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
const AuROString &find,
CodepointByteOffset_t uStartPosition)
{
@ -1233,7 +1233,7 @@ static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsa
/// An inefficient seek backwards to byte offset given an arbitrary codepoint offset.
/// Returns byte offset for codepoint offset - 1 or AuROString::npos
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromOffset(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromOffset(const AuROString &in,
CodepointOffset_t uStartPosition)
{
AuUInt uCounter = 0;
@ -1331,7 +1331,7 @@ static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidB
/// An efficient seek backwards to byte offset given an arbitrary codepoint byte offset.
/// Returns byte offset for codepoint byte offset - 1 or AuROString::npos
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromByteOffset(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidByteOffsetFromByteOffset(const AuROString &in,
CodepointByteOffset_t uStartPosition)
{
const char * pStart = in.data();
@ -1368,8 +1368,8 @@ static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindPreviousValidB
}
}
static AUROXTL_CONSTEXPR_17 CodepointOffset_t AuCodepointsFindCodepointOffset(const AuROString &in,
CodepointByteOffset_t uBytePosition)
AU_STATIC_CONSTEXPR_17 CodepointOffset_t AuCodepointsFindCodepointOffset(const AuROString &in,
CodepointByteOffset_t uBytePosition)
{
return AuCodepointsCount(in.substr(0, uBytePosition));
}
@ -1476,7 +1476,7 @@ static CodepointOffset_t AuCodepointsFindCodepointOffset(const AuR
}
/// For a given valid UTF8 string view, provides the delta byte offset or AuROString::npos, to delete the last most codepoint
static AUROXTL_CONSTEXPR_17 AuUInt AuCodepointsReverseIterate(const AuROString &string)
AU_STATIC_CONSTEXPR_17 AuUInt AuCodepointsReverseIterate(const AuROString &string)
{
auto uLastValid = AuCodepointsFindPreviousValidByteOffsetFromByteOffset(string, string.Size());
if (uLastValid == AuROString::npos)
@ -1488,7 +1488,7 @@ static AUROXTL_CONSTEXPR_17 AuUInt AuCodepointsReverseIterate(con
}
/// For a given valid UTF8 string view, to delete the last most codepoint, this provides a view with the suffix removed or an empty view.
static AUROXTL_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrPrefixView(const AuROString &string)
AU_STATIC_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrPrefixView(const AuROString &string)
{
auto uOffset = AuCodepointsReverseIterate(string);
if (uOffset == AuROString::npos)
@ -1500,7 +1500,7 @@ static AUROXTL_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubS
}
/// For a given valid UTF8 string view, to delete the last most codepoint, this provides a view with the just suffix to be removed or an empty view.
static AUROXTL_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrSuffixView(const AuROString &string)
AU_STATIC_CONSTEXPR_17 AuROString AuCodepointsReverseIterateSubStrSuffixView(const AuROString &string)
{
auto uLastValid = AuCodepointsFindPreviousValidByteOffsetFromByteOffset(string, string.Size());
if (uLastValid == AuROString::npos)

View File

@ -72,14 +72,14 @@ struct AuROString
}
inline AUROXTL_CONSTEXPR_17 AuROString(const char *str,
AuUInt uLength) :
AuUInt uLength) :
pPointer(str),
uLength(uLength)
{
}
inline AUROXTL_CONSTEXPR_17 AuROString(const char *str,
const char *strEnd) :
const char *strEnd) :
pPointer(str),
uLength(strEnd - str)
{
@ -135,7 +135,8 @@ struct AuROString
return const_reverse_iterator(this->cbegin());
}
inline AUROXTL_CONSTEXPR_17 AuROString substr(size_type pos1, size_type count1 = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 AuROString substr(size_type pos1,
size_type count1 = npos) const noexcept
{
if (pos1 >= this->uLength)
{
@ -454,7 +455,8 @@ struct AuROString
#endif
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const AuROString right, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const AuROString right,
const size_type offset = 0) const noexcept
{
if (right.size() == 0)
{
@ -464,62 +466,77 @@ struct AuROString
return this->find(right, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char c, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char c,
const size_type offset = 0) const noexcept
{
return this->find_first_of(AuROString(&c, 1), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_first_of(AuROString(s, count), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char *const s, const size_type offset = 0) const
inline AUROXTL_CONSTEXPR_17 size_type find_first_of(const char *const s,
const size_type offset = 0) const
{
return this->find_first_of(AuROString(s), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char c, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char c,
const size_type offset = npos) const noexcept
{
return this->find_last_of(AuROString(&c, 1), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_last_of(AuROString(s, count), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char *const s, const size_type offset = npos) const
inline AUROXTL_CONSTEXPR_17 size_type find_last_of(const char *const s,
const size_type offset = npos) const
{
return this->find_last_of(AuROString(s), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char c, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char c,
const size_type offset = 0) const noexcept
{
return this->find_first_not_of(AuROString(&c, 1), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_first_not_of(AuROString(s, count), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char *const s, const size_type offset = 0) const
inline AUROXTL_CONSTEXPR_17 size_type find_first_not_of(const char *const s,
const size_type offset = 0) const
{
return this->find_first_not_of(AuROString(s), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char c, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char c,
const size_type offset = npos) const noexcept
{
return this->find_last_not_of(AuROString(&c, 1), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char *const s,
const size_type offset, const size_type count) const
{
return this->find_last_not_of(AuROString(s, count), offset);
}
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char *const s, const size_type offset = npos) const
inline AUROXTL_CONSTEXPR_17 size_type find_last_not_of(const char *const s,
const size_type offset = npos) const
{
return this->find_last_not_of(AuROString(s), offset);
}
@ -571,12 +588,14 @@ struct AuROString
return this->crend();
}
inline AUROXTL_CONSTEXPR_17 AuROString Substr(size_type pos1, size_type count1 = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 AuROString Substr(size_type pos1,
size_type count1 = npos) const noexcept
{
return this->substr(pos1, count1);
}
inline AUROXTL_CONSTEXPR_17 AuROString SubStr(size_type pos1, size_type count1 = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 AuROString SubStr(size_type pos1,
size_type count1 = npos) const noexcept
{
return this->substr(pos1, count1);
}
@ -600,7 +619,7 @@ struct AuROString
}
inline AUROXTL_CONSTEXPR_17 int Compare(size_type pos1, size_type count1, AuROString v,
size_type pos2, size_type count2) const
size_type pos2, size_type count2) const
{
return this->compare(pos1, count1, v, pos2, count2);
}
@ -617,7 +636,7 @@ struct AuROString
}
inline AUROXTL_CONSTEXPR_17 int Compare(size_type pos1, size_type count1,
const char *s, size_type count2) const
const char *s, size_type count2) const
{
return this->compare(pos1, count1, s, count2);
}
@ -747,82 +766,101 @@ struct AuROString
return this->rfind(s, pos);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const AuROString right, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const AuROString right,
const size_type offset = 0) const noexcept
{
return this->find_first_not_of(right, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const AuROString right, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const AuROString right,
const size_type offset = npos) const noexcept
{
return this->find_last_not_of(right, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const AuROString right, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const AuROString right,
const size_type offset = npos) const noexcept
{
return this->find_last_of(right, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const AuROString right, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const AuROString right,
const size_type offset = 0) const noexcept
{
return this->find_first_of(right, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type Find_first_of(const char c, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type Find_first_of(const char c,
const size_type offset = 0) const noexcept
{
return this->find_first_of(c, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_first_of(s, offset, count);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const char *const s, const size_type offset = 0) const
inline AUROXTL_CONSTEXPR_17 size_type FindFirstOf(const char *const s,
const size_type offset = 0) const
{
return this->find_first_of(s, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char c, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char c,
const size_type offset = npos) const noexcept
{
return this->find_last_of(c, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_last_of(s, offset, count);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char *const s, const size_type offset = npos) const
inline AUROXTL_CONSTEXPR_17 size_type FindLastOf(const char *const s,
const size_type offset = npos) const
{
return this->find_last_of(s, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char c, const size_type offset = 0) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char c,
const size_type offset = 0) const noexcept
{
return this->find_first_not_of(c, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char *const s,
const size_type offset,
const size_type count) const
{
return this->find_first_not_of(s, offset, count);
}
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char *const s, const size_type offset = 0) const
inline AUROXTL_CONSTEXPR_17 size_type FindFirstNotOf(const char *const s,
const size_type offset = 0) const
{
return this->find_first_not_of(s, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char c, const size_type offset = npos) const noexcept
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char c,
const size_type offset = npos) const noexcept
{
return this->find_last_not_of(c, offset);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char *const s, const size_type offset, const size_type count) const
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char *const s,
const size_type offset, const size_type count) const
{
return this->find_last_not_of(s, offset, count);
}
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char *const s, const size_type offset = npos) const
inline AUROXTL_CONSTEXPR_17 size_type FindLastNotOf(const char *const s,
const size_type offset = npos) const
{
return this->find_last_not_of(s, offset);
}

View File

@ -20,27 +20,27 @@ static AuString AuCodepointsToLower(const AuROString &in);
/// No localization complexities are, will, or should be involved.
static AuString AuCodepointsToUpper(const AuROString &in);
static auline AU_CONSTEXPR_17 bool AuIsAlpha(char c)
AU_INLINE_CONSTEXPR_17 bool AuIsAlpha(char c)
{
return (c) && (((unsigned char)c | 0x20) - 'a' < 26);
}
static auline AU_CONSTEXPR_17 char AuToLower(char c)
AU_INLINE_CONSTEXPR_17 char AuToLower(char c)
{
return AuIsAlpha(c) ? c | 0x20 : c;
}
static auline AU_CONSTEXPR_17 char AuToUpper(char c)
AU_INLINE_CONSTEXPR_17 char AuToUpper(char c)
{
return AuIsAlpha(c) ? c & ~0x20 : c;
}
static auline AU_CONSTEXPR_17 bool AuStringContains(const AuROString &value, const AuROString &subpattern)
AU_INLINE_CONSTEXPR_17 bool AuStringContains(const AuROString &value, const AuROString &subpattern)
{
return value.find(subpattern) != AuROString::npos;
}
static auline AU_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, AuROString const &ending)
AU_INLINE_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, AuROString const &ending)
{
if (ending.size() > value.size())
{
@ -52,7 +52,7 @@ static auline AU_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, AuROStrin
}
}
static auline AU_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, const char &ending)
AU_INLINE_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, const char ending)
{
if (value.empty())
{
@ -64,7 +64,7 @@ static auline AU_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, const cha
}
}
static auline AU_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, AuROString const &starting)
AU_INLINE_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, AuROString const &starting)
{
#if defined(AU_STRING_IS_TINYUTF_EXPERIMENT)
return value.starts_with(starting);
@ -75,7 +75,7 @@ static auline AU_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, AuROStr
#endif
}
static auline AU_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, const char &starting)
AU_INLINE_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, const char starting)
{
if (value.empty())
{

View File

@ -71,37 +71,37 @@ namespace __audetail
#endif
template <class T>
static auline bool AuTestBit(T value, AuUInt8 idx)
AU_OPTIMIZED bool AuTestBit(T value, AuUInt8 idx)
{
return value & (T(1) << T(idx));
}
template <class T>
static auline bool AuBitTest(T value, AuUInt8 idx)
AU_OPTIMIZED bool AuBitTest(T value, AuUInt8 idx)
{
return value & (T(1) << T(idx));
}
template <class T>
static auline void AuSetBit(T &value, AuUInt8 idx)
AU_OPTIMIZED void AuSetBit(T &value, AuUInt8 idx)
{
value |= T(1) << T(idx);
}
template <class T>
static auline void AuBitSet(T &value, AuUInt8 idx)
AU_OPTIMIZED void AuBitSet(T &value, AuUInt8 idx)
{
value |= T(1) << T(idx);
}
template <class T>
static auline void AuClearBit(T &value, AuUInt8 idx)
AU_OPTIMIZED void AuClearBit(T &value, AuUInt8 idx)
{
value &= ~(T(1) << T(idx));
}
template <class T>
static auline void AuBitClear(T &value, AuUInt8 idx)
AU_OPTIMIZED void AuBitClear(T &value, AuUInt8 idx)
{
value &= ~(T(1) << T(idx));
}
@ -110,7 +110,7 @@ static auline void AuBitClear(T &value, AuUInt8 idx)
/// xref MSDN for "_BitScanForward" intrin
/// (+ u64 variants work on 32bit targets)
template <class T>
static auline bool AuBitScanForward(AuUInt8 &index, T value)
AU_OPTIMIZED bool AuBitScanForward(AuUInt8 &index, T value)
{
unsigned long ret;
bool success;
@ -180,7 +180,7 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value)
/// xref MSDN for "_BitScanReverse" intrin
/// (+ u64 variants work on 32bit targets)
template <class T>
static auline bool AuBitScanReverse(AuUInt8 &index, T value)
AU_OPTIMIZED bool AuBitScanReverse(AuUInt8 &index, T value)
{
unsigned long ret;
bool success;
@ -269,7 +269,7 @@ static auline bool AuBitScanReverse(AuUInt8 &index, T value)
/// AuBitScanForward utility - offsets value by uOffset of last uIndex
template <class T>
static auline bool AuBitScanForwardItr(AuUInt8 &uIndex, T value, AuUInt8 uOffset = 0)
AU_OPTIMIZED bool AuBitScanForwardItr(AuUInt8 &uIndex, T value, AuUInt8 uOffset = 0)
{
if (AuBitScanForward<T>(uIndex, value >> uOffset))
{
@ -284,7 +284,7 @@ static auline bool AuBitScanForwardItr(AuUInt8 &uIndex, T value, AuUInt8 uOffset
/// AuBitScanReverse utility - offsets value by uOffset of last uIndex, starting at end bit offset, to break/false on 0.
template <class T>
static auline bool AuBitScanReverseItr(AuUInt8 &uIndex, T value, AuUInt8 uOffset = sizeof(T) * 8)
AU_OPTIMIZED bool AuBitScanReverseItr(AuUInt8 &uIndex, T value, AuUInt8 uOffset = sizeof(T) * 8)
{
if (uOffset == 0)
{

View File

@ -69,7 +69,7 @@ struct AuEnableSharedFromThis : Aurora::Memory::ExSharedFromThis<X, std::enable_
static inline AU_NORETURN void SysPanic(const char *pMsg);
static auline void AuMemoryPanic(const char *msg)
AU_OPTIMIZED void AuMemoryPanic(const char *msg)
{
#if defined(AURORA_RUNTIME_MEMORY_PANIC)
AURORA_RUNTIME_MEMORY_PANIC(msg);
@ -332,7 +332,7 @@ template <class T, typename... Args>
AuSPtr<T> AuMakeShared(Args&&... args);
template <class T, typename... Args>
static auline AuSPtr<T> AuMakeSharedPanic(Args&&... args)
AU_OPTIMIZED AuSPtr<T> AuMakeSharedPanic(Args&&... args)
{
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
try
@ -362,7 +362,7 @@ static auline AuSPtr<T> AuMakeSharedPanic(Args&&... args)
}
template <class T, typename... Args>
static auline AuSPtr<T> AuMakeSharedThrow(Args&&... args)
AU_OPTIMIZED AuSPtr<T> AuMakeSharedThrow(Args&&... args)
{
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
try
@ -394,7 +394,7 @@ static auline AuSPtr<T> AuMakeSharedThrow(Args&&... args)
}
template <class T>
static auline AuSPtr<T> AuMakeSharedArray(AuUInt count)
AU_OPTIMIZED AuSPtr<T> AuMakeSharedArray(AuUInt count)
{
try
{

View File

@ -20,7 +20,7 @@
#else
static auline int AuMemcmp(const void *dest, const void *src, size_t n)
AU_OPTIMIZED int AuMemcmp(const void *dest, const void *src, size_t n)
{
return AURORA_RUNTIME_MEMCMP(dest, src, n);
}
@ -37,7 +37,7 @@
#else
static auline void *AuMemset(void *dest, AuUInt8 c, size_t n)
AU_OPTIMIZED void *AuMemset(void *dest, AuUInt8 c, size_t n)
{
return AURORA_RUNTIME_MEMSET(dest, c, n);
}
@ -54,7 +54,7 @@
#else
static auline void *AuMemcpy(void *dest, const void *src, size_t n)
AU_OPTIMIZED void *AuMemcpy(void *dest, const void *src, size_t n)
{
return AURORA_RUNTIME_MEMCPY(dest, src, n);
}
@ -65,13 +65,13 @@
#define AURORA_RUNTIME_MEMMOVE std::memmove
#endif
static auline void *AuMemmove(void *dest, const void *src, size_t n)
AU_OPTIMIZED void *AuMemmove(void *dest, const void *src, size_t n)
{
return AURORA_RUNTIME_MEMMOVE(dest, src, n);
}
static auline void *AuMemmem(const void *haystack, size_t haystackLen,
const void *const needle, const size_t needleLen)
AU_OPTIMIZED void *AuMemmem(const void *haystack, size_t haystackLen,
const void *const needle, const size_t needleLen)
{
#if defined(AURORA_IS_LINUX_DERIVED)
return ::memmem(haystack, haystackLen, needle, needleLen);

View File

@ -19,7 +19,7 @@
AuCodepointsContains,
AuCodepointsReplaceAll, AuCodepointsSplitString (views),
AuCodepointsFindPreviousValidByteOffsetFromOffset, AuCodepointsFindPreviousValidByteOffsetFromByteOffset
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithEqualIgnoreCase, AuCodepointsEndsWithEqualIgnoreCase,
AuCodepointsIsEqualIgnoreCase, AuCodepointsStartsWithIgnoreCase, AuCodepointsEndsWithIgnoreCase,
AuCodepointsReverseIterate, AuCodepointsReverseIterateSubStrPrefixView, AuCodepointsReverseIterateSubStrSuffixView
Warning: By codepoints, we mean UTF32.
@ -70,7 +70,7 @@
#endif
template <class T>
static auline AuString AuToString(const T &obj)
AU_OPTIMIZED AuString AuToString(const T &obj)
{
#if defined(_AUHAS_FMT)
// locale independent and better optimized!

View File

@ -394,8 +394,8 @@ template <template <class...> class Base, typename Derived>
struct AuIsBaseOfTemplateImpl
{
template <class... Ts>
static AUROXTL_CONSTEXPR_17 AuTrueType Test(const Base<Ts...> *);
static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
AU_STATIC_CONSTEXPR_17 AuTrueType Test(const Base<Ts...> *);
AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test(AuDeclVal<AuRemoveReference_t<Derived> *>()));
};

View File

@ -14,7 +14,7 @@
#endif
template <class T>
static auline T AuReadGenericLE(const void *ptr, int offset)
AU_OPTIMIZED T AuReadGenericLE(const void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF)
T temp = *reinterpret_cast<const T *>(reinterpret_cast<const AuUInt8 *>(ptr) + offset);
@ -34,7 +34,7 @@ static auline T AuReadGenericLE(const void *ptr, int offset)
}
template <class T>
static auline T AuReadGenericBE(const void *ptr, int offset)
AU_OPTIMIZED T AuReadGenericBE(const void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF)
T temp = *reinterpret_cast<const T *>(reinterpret_cast<const AuUInt8 *>(ptr) + offset);
@ -53,87 +53,87 @@ static auline T AuReadGenericBE(const void *ptr, int offset)
return temp;
}
static auline AuUInt64 AuReadU64LE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt64>(ptr, offset);
}
static auline AuUInt32 AuReadU32LE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt32>(ptr, offset);
}
static auline AuUInt16 AuReadU16LE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt16>(ptr, offset);
}
static auline AuUInt8 AuReadU8LE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt8>(ptr, offset);
}
static auline AuInt64 AuReadS64LE(const void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt64>(ptr, offset);
}
static auline AuInt32 AuReadS32LE(const void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt32>(ptr, offset);
}
static auline AuInt16 AuReadS16LE(const void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt16>(ptr, offset);
}
static auline AuInt8 AuReadS8LE(const void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt8>(ptr, offset);
}
static auline AuUInt64 AuReadU64BE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt64>(ptr, offset);
}
static auline AuUInt32 AuReadU32BE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt32>(ptr, offset);
}
static auline AuUInt16 AuReadU16BE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt16>(ptr, offset);
}
static auline AuUInt8 AuReadU8BE(const void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt8>(ptr, offset);
}
static auline AuInt64 AuReadS64BE(const void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt64>(ptr, offset);
}
static auline AuInt32 AuReadS32BE(const void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt32>(ptr, offset);
}
static auline AuInt16 AuReadS16BE(const void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt16>(ptr, offset);
}
static auline AuInt8 AuReadS8BE(const void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt8>(ptr, offset);
}
static auline AuUInt64 AuReadU64(const void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU64LE(ptr, offset);
@ -142,7 +142,7 @@ static auline AuUInt64 AuReadU64(const void *ptr, int offset)
#endif
}
static auline AuUInt32 AuReadU32(const void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU32LE(ptr, offset);
@ -151,7 +151,7 @@ static auline AuUInt32 AuReadU32(const void *ptr, int offset)
#endif
}
static auline AuUInt16 AuReadU16(const void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU16LE(ptr, offset);
@ -160,7 +160,7 @@ static auline AuUInt16 AuReadU16(const void *ptr, int offset)
#endif
}
static auline AuUInt8 AuReadU8(const void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU8LE(ptr, offset);
@ -169,7 +169,7 @@ static auline AuUInt8 AuReadU8(const void *ptr, int offset)
#endif
}
static auline AuInt64 AuReadS64(const void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS64LE(ptr, offset);
@ -178,7 +178,7 @@ static auline AuInt64 AuReadS64(const void *ptr, int offset)
#endif
}
static auline AuInt32 AuReadS32(const void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS32LE(ptr, offset);
@ -187,7 +187,7 @@ static auline AuInt32 AuReadS32(const void *ptr, int offset)
#endif
}
static auline AuInt16 AuReadS16(const void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS16LE(ptr, offset);
@ -196,7 +196,7 @@ static auline AuInt16 AuReadS16(const void *ptr, int offset)
#endif
}
static auline AuInt8 AuReadS8(const void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS8LE(ptr, offset);
@ -206,7 +206,7 @@ static auline AuInt8 AuReadS8(const void *ptr, int offset)
}
template <class T>
static auline void AuWriteGenericLE(void *ptr, int offset, T value)
AU_OPTIMIZED void AuWriteGenericLE(void *ptr, int offset, T value)
{
#if !defined(AU_CPU_ENDIAN_LITTLE)
value = AuFlipEndian(value);
@ -220,7 +220,7 @@ static auline void AuWriteGenericLE(void *ptr, int offset, T value)
}
template <class T>
static auline void AuWriteGenericBE(void *ptr, int offset, T value)
AU_OPTIMIZED void AuWriteGenericBE(void *ptr, int offset, T value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
value = AuFlipEndian(value);
@ -233,87 +233,87 @@ static auline void AuWriteGenericBE(void *ptr, int offset, T value)
#endif
}
static auline void AuWriteU64LE(void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64LE(void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericLE<AuUInt64>(ptr, offset, value);
}
static auline void AuWriteU32LE(void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32LE(void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericLE<AuUInt32>(ptr, offset, value);
}
static auline void AuWriteU16LE(void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16LE(void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericLE<AuUInt16>(ptr, offset, value);
}
static auline void AuWriteU8LE(void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8LE(void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericLE<AuUInt8>(ptr, offset, value);
}
static auline void AuWriteS64LE(void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64LE(void *ptr, int offset, AuInt64 value)
{
AuWriteGenericLE<AuInt64>(ptr, offset, value);
}
static auline void AuWriteS32LE(void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32LE(void *ptr, int offset, AuInt32 value)
{
AuWriteGenericLE<AuInt32>(ptr, offset, value);
}
static auline void AuWriteS16LE(void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16LE(void *ptr, int offset, AuInt16 value)
{
AuWriteGenericLE<AuInt16>(ptr, offset, value);
}
static auline void AuWriteS8LE(void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8LE(void *ptr, int offset, AuInt8 value)
{
AuWriteGenericLE<AuInt8>(ptr, offset, value);
}
static auline void AuWriteU64BE(void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64BE(void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericBE<AuUInt64>(ptr, offset, value);
}
static auline void AuWriteU32BE(void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32BE(void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericBE<AuUInt32>(ptr, offset, value);
}
static auline void AuWriteU16BE(void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16BE(void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericBE<AuUInt16>(ptr, offset, value);
}
static auline void AuWriteU8BE(void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8BE(void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericBE<AuUInt8>(ptr, offset, value);
}
static auline void AuWriteS64BE(void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64BE(void *ptr, int offset, AuInt64 value)
{
AuWriteGenericBE<AuInt64>(ptr, offset, value);
}
static auline void AuWriteS32BE(void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32BE(void *ptr, int offset, AuInt32 value)
{
AuWriteGenericBE<AuInt32>(ptr, offset, value);
}
static auline void AuWriteS16BE(void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16BE(void *ptr, int offset, AuInt16 value)
{
AuWriteGenericBE<AuInt16>(ptr, offset, value);
}
static auline void AuWriteS8BE(void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8BE(void *ptr, int offset, AuInt8 value)
{
AuWriteGenericBE<AuInt8>(ptr, offset, value);
}
static auline void AuWriteU64(void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64(void *ptr, int offset, AuUInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU64LE(ptr, offset, value);
@ -322,7 +322,7 @@ static auline void AuWriteU64(void *ptr, int offset, AuUInt64 value)
#endif
}
static auline void AuWriteU32(void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32(void *ptr, int offset, AuUInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU32LE(ptr, offset, value);
@ -331,7 +331,7 @@ static auline void AuWriteU32(void *ptr, int offset, AuUInt32 value)
#endif
}
static auline void AuWriteU16(void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16(void *ptr, int offset, AuUInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU16LE(ptr, offset, value);
@ -340,7 +340,7 @@ static auline void AuWriteU16(void *ptr, int offset, AuUInt16 value)
#endif
}
static auline void AuWriteU8(void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8(void *ptr, int offset, AuUInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU8LE(ptr, offset, value);
@ -349,7 +349,7 @@ static auline void AuWriteU8(void *ptr, int offset, AuUInt8 value)
#endif
}
static auline void AuWriteS64(void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64(void *ptr, int offset, AuInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS64LE(ptr, offset, value);
@ -358,7 +358,7 @@ static auline void AuWriteS64(void *ptr, int offset, AuInt64 value)
#endif
}
static auline void AuWriteS32(void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32(void *ptr, int offset, AuInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS32LE(ptr, offset, value);
@ -367,7 +367,7 @@ static auline void AuWriteS32(void *ptr, int offset, AuInt32 value)
#endif
}
static auline void AuWriteS16(void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16(void *ptr, int offset, AuInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS16LE(ptr, offset, value);
@ -376,7 +376,7 @@ static auline void AuWriteS16(void *ptr, int offset, AuInt16 value)
#endif
}
static auline void AuWriteS8(void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8(void *ptr, int offset, AuInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS8LE(ptr, offset, value);
@ -386,7 +386,7 @@ static auline void AuWriteS8(void *ptr, int offset, AuInt8 value)
}
template <class T>
static auline T AuReadGenericLE(const volatile void *ptr, int offset)
AU_OPTIMIZED T AuReadGenericLE(const volatile void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && ((defined(AURORA_COMPILER_CLANG) && !defined(CLANG_NOT_X86_AND_NOT_VOLATILEMS)) || defined(AURORA_COMPILER_MSVC))
T temp = *reinterpret_cast<const volatile T *>(reinterpret_cast<const volatile AuUInt8 *>(ptr) + offset);
@ -408,7 +408,7 @@ static auline T AuReadGenericLE(const volatile void *ptr, int offset)
}
template <class T>
static auline T AuReadGenericBE(const volatile void *ptr, int offset)
AU_OPTIMIZED T AuReadGenericBE(const volatile void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && ((defined(AURORA_COMPILER_CLANG) && !defined(CLANG_NOT_X86_AND_NOT_VOLATILEMS)) || defined(AURORA_COMPILER_MSVC))
T temp = *reinterpret_cast<const volatile T *>(reinterpret_cast<const volatile AuUInt8 *>(ptr) + offset);
@ -429,87 +429,87 @@ static auline T AuReadGenericBE(const volatile void *ptr, int offset)
return temp;
}
static auline AuUInt64 AuReadU64LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuUInt64>(ptr, offset);
}
static auline AuUInt32 AuReadU32LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuUInt32>(ptr, offset);
}
static auline AuUInt16 AuReadU16LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuUInt16>(ptr, offset);
}
static auline AuUInt8 AuReadU8LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuUInt8>(ptr, offset);
}
static auline AuInt64 AuReadS64LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuInt64>(ptr, offset);
}
static auline AuInt32 AuReadS32LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuInt32>(ptr, offset);
}
static auline AuInt16 AuReadS16LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuInt16>(ptr, offset);
}
static auline AuInt8 AuReadS8LE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8LE(const volatile void *ptr, int offset)
{
return AuReadGenericLE<AuInt8>(ptr, offset);
}
static auline AuUInt64 AuReadU64BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuUInt64>(ptr, offset);
}
static auline AuUInt32 AuReadU32BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuUInt32>(ptr, offset);
}
static auline AuUInt16 AuReadU16BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuUInt16>(ptr, offset);
}
static auline AuUInt8 AuReadU8BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuUInt8>(ptr, offset);
}
static auline AuInt64 AuReadS64BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuInt64>(ptr, offset);
}
static auline AuInt32 AuReadS32BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuInt32>(ptr, offset);
}
static auline AuInt16 AuReadS16BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuInt16>(ptr, offset);
}
static auline AuInt8 AuReadS8BE(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8BE(const volatile void *ptr, int offset)
{
return AuReadGenericBE<AuInt8>(ptr, offset);
}
static auline AuUInt64 AuReadU64(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt64 AuReadU64(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU64LE(ptr, offset);
@ -518,7 +518,7 @@ static auline AuUInt64 AuReadU64(const volatile void *ptr, int offset)
#endif
}
static auline AuUInt32 AuReadU32(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt32 AuReadU32(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU32LE(ptr, offset);
@ -527,7 +527,7 @@ static auline AuUInt32 AuReadU32(const volatile void *ptr, int offset)
#endif
}
static auline AuUInt16 AuReadU16(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt16 AuReadU16(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU16LE(ptr, offset);
@ -536,7 +536,7 @@ static auline AuUInt16 AuReadU16(const volatile void *ptr, int offset)
#endif
}
static auline AuUInt8 AuReadU8(const volatile void *ptr, int offset)
AU_OPTIMIZED AuUInt8 AuReadU8(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU8LE(ptr, offset);
@ -545,7 +545,7 @@ static auline AuUInt8 AuReadU8(const volatile void *ptr, int offset)
#endif
}
static auline AuInt64 AuReadS64(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt64 AuReadS64(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS64LE(ptr, offset);
@ -554,7 +554,7 @@ static auline AuInt64 AuReadS64(const volatile void *ptr, int offset)
#endif
}
static auline AuInt32 AuReadS32(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt32 AuReadS32(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS32LE(ptr, offset);
@ -563,7 +563,7 @@ static auline AuInt32 AuReadS32(const volatile void *ptr, int offset)
#endif
}
static auline AuInt16 AuReadS16(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt16 AuReadS16(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS16LE(ptr, offset);
@ -572,7 +572,7 @@ static auline AuInt16 AuReadS16(const volatile void *ptr, int offset)
#endif
}
static auline AuInt8 AuReadS8(const volatile void *ptr, int offset)
AU_OPTIMIZED AuInt8 AuReadS8(const volatile void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS8LE(ptr, offset);
@ -582,7 +582,7 @@ static auline AuInt8 AuReadS8(const volatile void *ptr, int offset)
}
template <class T>
static auline void AuWriteGenericLE(volatile void *ptr, int offset, T value)
AU_OPTIMIZED void AuWriteGenericLE(volatile void *ptr, int offset, T value)
{
#if !defined(AU_CPU_ENDIAN_LITTLE)
value = AuFlipEndian(value);
@ -596,7 +596,7 @@ static auline void AuWriteGenericLE(volatile void *ptr, int offset, T value)
}
template <class T>
static auline void AuWriteGenericBE(volatile void *ptr, int offset, T value)
AU_OPTIMIZED void AuWriteGenericBE(volatile void *ptr, int offset, T value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
value = AuFlipEndian(value);
@ -609,87 +609,87 @@ static auline void AuWriteGenericBE(volatile void *ptr, int offset, T value)
#endif
}
static auline void AuWriteU64LE(volatile void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64LE(volatile void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericLE<AuUInt64>(ptr, offset, value);
}
static auline void AuWriteU32LE(volatile void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32LE(volatile void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericLE<AuUInt32>(ptr, offset, value);
}
static auline void AuWriteU16LE(volatile void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16LE(volatile void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericLE<AuUInt16>(ptr, offset, value);
}
static auline void AuWriteU8LE(volatile void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8LE(volatile void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericLE<AuUInt8>(ptr, offset, value);
}
static auline void AuWriteS64LE(volatile void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64LE(volatile void *ptr, int offset, AuInt64 value)
{
AuWriteGenericLE<AuInt64>(ptr, offset, value);
}
static auline void AuWriteS32LE(volatile void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32LE(volatile void *ptr, int offset, AuInt32 value)
{
AuWriteGenericLE<AuInt32>(ptr, offset, value);
}
static auline void AuWriteS16LE(volatile void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16LE(volatile void *ptr, int offset, AuInt16 value)
{
AuWriteGenericLE<AuInt16>(ptr, offset, value);
}
static auline void AuWriteS8LE(volatile void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8LE(volatile void *ptr, int offset, AuInt8 value)
{
AuWriteGenericLE<AuInt8>(ptr, offset, value);
}
static auline void AuWriteU64BE(volatile void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64BE(volatile void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericBE<AuUInt64>(ptr, offset, value);
}
static auline void AuWriteU32BE(volatile void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32BE(volatile void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericBE<AuUInt32>(ptr, offset, value);
}
static auline void AuWriteU16BE(volatile void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16BE(volatile void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericBE<AuUInt16>(ptr, offset, value);
}
static auline void AuWriteU8BE(volatile void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8BE(volatile void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericBE<AuUInt8>(ptr, offset, value);
}
static auline void AuWriteS64BE(volatile void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64BE(volatile void *ptr, int offset, AuInt64 value)
{
AuWriteGenericBE<AuInt64>(ptr, offset, value);
}
static auline void AuWriteS32BE(volatile void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32BE(volatile void *ptr, int offset, AuInt32 value)
{
AuWriteGenericBE<AuInt32>(ptr, offset, value);
}
static auline void AuWriteS16BE(volatile void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16BE(volatile void *ptr, int offset, AuInt16 value)
{
AuWriteGenericBE<AuInt16>(ptr, offset, value);
}
static auline void AuWriteS8BE(volatile void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8BE(volatile void *ptr, int offset, AuInt8 value)
{
AuWriteGenericBE<AuInt8>(ptr, offset, value);
}
static auline void AuWriteU64(volatile void *ptr, int offset, AuUInt64 value)
AU_OPTIMIZED void AuWriteU64(volatile void *ptr, int offset, AuUInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU64LE(ptr, offset, value);
@ -698,7 +698,7 @@ static auline void AuWriteU64(volatile void *ptr, int offset, AuUInt64 value)
#endif
}
static auline void AuWriteU32(volatile void *ptr, int offset, AuUInt32 value)
AU_OPTIMIZED void AuWriteU32(volatile void *ptr, int offset, AuUInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU32LE(ptr, offset, value);
@ -707,7 +707,7 @@ static auline void AuWriteU32(volatile void *ptr, int offset, AuUInt32 value)
#endif
}
static auline void AuWriteU16(volatile void *ptr, int offset, AuUInt16 value)
AU_OPTIMIZED void AuWriteU16(volatile void *ptr, int offset, AuUInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU16LE(ptr, offset, value);
@ -716,7 +716,7 @@ static auline void AuWriteU16(volatile void *ptr, int offset, AuUInt16 value)
#endif
}
static auline void AuWriteU8(volatile void *ptr, int offset, AuUInt8 value)
AU_OPTIMIZED void AuWriteU8(volatile void *ptr, int offset, AuUInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU8LE(ptr, offset, value);
@ -725,7 +725,7 @@ static auline void AuWriteU8(volatile void *ptr, int offset, AuUInt8 value)
#endif
}
static auline void AuWriteS64(volatile void *ptr, int offset, AuInt64 value)
AU_OPTIMIZED void AuWriteS64(volatile void *ptr, int offset, AuInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS64LE(ptr, offset, value);
@ -734,7 +734,7 @@ static auline void AuWriteS64(volatile void *ptr, int offset, AuInt64 value)
#endif
}
static auline void AuWriteS32(volatile void *ptr, int offset, AuInt32 value)
AU_OPTIMIZED void AuWriteS32(volatile void *ptr, int offset, AuInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS32LE(ptr, offset, value);
@ -743,7 +743,7 @@ static auline void AuWriteS32(volatile void *ptr, int offset, AuInt32 value)
#endif
}
static auline void AuWriteS16(volatile void *ptr, int offset, AuInt16 value)
AU_OPTIMIZED void AuWriteS16(volatile void *ptr, int offset, AuInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS16LE(ptr, offset, value);
@ -752,7 +752,7 @@ static auline void AuWriteS16(volatile void *ptr, int offset, AuInt16 value)
#endif
}
static auline void AuWriteS8(volatile void *ptr, int offset, AuInt8 value)
AU_OPTIMIZED void AuWriteS8(volatile void *ptr, int offset, AuInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS8LE(ptr, offset, value);

View File

@ -13,12 +13,12 @@ using CodepointOffset_t = AuUInt;
// AuStringUtils.hpp fwd decl
static AUROXTL_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
AU_STATIC_CONSTEXPR_17 CodepointByteOffset_t AuCodepointsFindByteOffsetUnsafe(const AuROString &in,
const AuROString &find,
CodepointByteOffset_t uStartPosition = {});
static auline AU_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, AuROString const &ending);
static auline AU_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, AuROString const &starting);
AU_INLINE_CONSTEXPR_17 bool AuEndsWith(AuROString const &value, AuROString const &ending);
AU_INLINE_CONSTEXPR_17 bool AuStartsWith(AuROString const &value, AuROString const &starting);
// TODO: implement AuStringView (does not exist yet) (without std::string_view)

View File

@ -19,7 +19,7 @@ extern "C"
);
}
static auline void AuWin32CloseHandle(void *&handle)
AU_OPTIMIZED void AuWin32CloseHandle(void *&handle)
{
void *local;

View File

@ -50,8 +50,8 @@ namespace __audetail
template <class T> \
struct AuHas ## name \
{ \
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::name)); \
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...); \
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::name)); \
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...); \
using type = decltype(Test<T>(0)); \
}; \
\
@ -68,8 +68,8 @@ namespace __audetail
template <class T>
struct AuHastry_emplace
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::try_emplace));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::try_emplace));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -79,8 +79,8 @@ namespace __audetail
template <class T>
struct AuHasemplace
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(&C::emplace));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(&C::emplace));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -90,9 +90,9 @@ namespace __audetail
template <class T>
struct AuHasfind
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::key_type &) const>(&C::find)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::element_type &) const>(&C::find)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::key_type &) const>(&C::find)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::element_type &) const>(&C::find)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -102,9 +102,9 @@ namespace __audetail
template <class T>
struct AuHasFind
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::key_type &) const>(&C::Find)));
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::element_type &) const>(&C::Find)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::key_type &) const>(&C::Find)));
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::element_type &) const>(&C::Find)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -114,8 +114,8 @@ namespace __audetail
template <class T>
struct AuHasend
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::end)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::end)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -125,8 +125,8 @@ namespace __audetail
template <class T>
struct AuHasEnd
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::End)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::End)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -136,8 +136,8 @@ namespace __audetail
template <class T>
struct AuHasbegin
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::begin)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::begin)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};
@ -147,8 +147,8 @@ namespace __audetail
template <class T>
struct AuHasBegin
{
template <class C> static AUROXTL_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::Begin)));
template <class C> static AUROXTL_CONSTEXPR_17 AuFalseType Test(...);
template <class C> AU_STATIC_CONSTEXPR_17 AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::Begin)));
template <class C> AU_STATIC_CONSTEXPR_17 AuFalseType Test(...);
using type = decltype(Test<T>(0));
};