[*] Conformity - Clang Fixes
This commit is contained in:
parent
f4f98cec83
commit
11ebcde5c2
@ -64,8 +64,8 @@ namespace __audetail
|
|||||||
template <class T>
|
template <class T>
|
||||||
struct AuHasfind
|
struct AuHasfind
|
||||||
{
|
{
|
||||||
template <class C> static constexpr AuTrueType Test(decltype(static_cast<C::const_iterator(C:: *)(const C::key_type &) const>(&C::find)));
|
template <class C> static constexpr AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::key_type &) const>(&C::find)));
|
||||||
template <class C> static constexpr AuTrueType Test(decltype(static_cast<C::const_iterator(C:: *)(const C::element_type &) const>(&C::find)));
|
template <class C> static constexpr AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)(const typename C::element_type &) const>(&C::find)));
|
||||||
template <class C> static constexpr AuFalseType Test(...);
|
template <class C> static constexpr AuFalseType Test(...);
|
||||||
using type = decltype(Test<T>(0));
|
using type = decltype(Test<T>(0));
|
||||||
};
|
};
|
||||||
@ -76,7 +76,7 @@ namespace __audetail
|
|||||||
template <class T>
|
template <class T>
|
||||||
struct AuHasend
|
struct AuHasend
|
||||||
{
|
{
|
||||||
template <class C> static constexpr AuTrueType Test(decltype(static_cast<C::const_iterator(C:: *)() const>(&C::end)));
|
template <class C> static constexpr AuTrueType Test(decltype(static_cast<typename C::const_iterator(C:: *)() const>(&C::end)));
|
||||||
template <class C> static constexpr AuFalseType Test(...);
|
template <class C> static constexpr AuFalseType Test(...);
|
||||||
using type = decltype(Test<T>(0));
|
using type = decltype(Test<T>(0));
|
||||||
};
|
};
|
||||||
|
@ -154,6 +154,10 @@ static void auline AuSafeDelete(T *in)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO: Move me
|
||||||
|
#include "auOptional.hpp"
|
||||||
|
#include "auCastUtils.hpp"
|
||||||
|
|
||||||
namespace Aurora::Memory
|
namespace Aurora::Memory
|
||||||
{
|
{
|
||||||
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
|
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
|
||||||
@ -186,7 +190,7 @@ namespace Aurora::Memory
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
inline [[nodiscard]] constexpr T* allocate(Types::size_t n)
|
inline constexpr T* allocate(Types::size_t n)
|
||||||
{
|
{
|
||||||
if (auto p = (__FAlloc(n * sizeof(T), alignof(T))))
|
if (auto p = (__FAlloc(n * sizeof(T), alignof(T))))
|
||||||
{
|
{
|
||||||
|
@ -288,8 +288,8 @@ using AuEnableIf_t = typename AuEnableIf<Test, T>::type;
|
|||||||
template <class T, class ... Args>
|
template <class T, class ... Args>
|
||||||
struct AuIsConstructible
|
struct AuIsConstructible
|
||||||
{
|
{
|
||||||
template <class T, class ... Args> static constexpr AuTrueType Test(decltype(T(AuDeclVal<Args>()...)));
|
template <class C, class ... Args2> static constexpr AuTrueType Test(decltype(C(AuDeclVal<Args2>()...)));
|
||||||
template <class T, class ... Args> static constexpr AuFalseType Test(...);
|
static constexpr AuFalseType Test(...);
|
||||||
using type = decltype(Test<T, Args...>(0));
|
using type = decltype(Test<T, Args...>(0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
***/
|
***/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(AURORA_COMPILER_CLANG)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wambiguous-ellipsis"
|
||||||
|
#endif
|
||||||
|
|
||||||
// primary
|
// primary
|
||||||
|
|
||||||
template <class>
|
template <class>
|
||||||
@ -169,4 +174,8 @@ template <class Ret, class... Args>
|
|||||||
struct AuIsFunction<Ret(Args......) const volatile && noexcept> : AuTrueType {};
|
struct AuIsFunction<Ret(Args......) const volatile && noexcept> : AuTrueType {};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline constexpr bool AuIsFunction_v = AuIsFunction<T>::value;
|
inline constexpr bool AuIsFunction_v = AuIsFunction<T>::value;
|
||||||
|
|
||||||
|
#if defined(AURORA_COMPILER_CLANG)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
@ -21,5 +21,9 @@ using AuPair = AURORA_RUNTIME_AU_PAIR<A_t, B_t>;
|
|||||||
#define AURORA_RUNTIME_AU_TUPLE std::tuple
|
#define AURORA_RUNTIME_AU_TUPLE std::tuple
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class... Types>
|
#if defined(AURORA_COMPILER_CLANG)
|
||||||
using AuTuple = AURORA_RUNTIME_AU_TUPLE<Types...>;
|
#define AuTuple std::tuple
|
||||||
|
#else
|
||||||
|
template <class... Types>
|
||||||
|
using AuTuple = AURORA_RUNTIME_AU_TUPLE<Types...>;
|
||||||
|
#endif
|
@ -144,7 +144,7 @@ static constexpr AuTuple<Args&& ...> AuTupleForward(Args&& ... args)
|
|||||||
// Stolen: https://codereview.stackexchange.com/questions/193420/apply-a-function-to-each-element-of-a-tuple-map-a-tuple
|
// Stolen: https://codereview.stackexchange.com/questions/193420/apply-a-function-to-each-element-of-a-tuple-map-a-tuple
|
||||||
namespace __audetail
|
namespace __audetail
|
||||||
{
|
{
|
||||||
template <class Fn, typename Argument, AuUInt... Ns>
|
template <class Fn, class Argument, AuUInt... Ns>
|
||||||
static auto AuTupleTransformImpl(const Fn &fn, Argument &&argument, AuIndexSequence<Ns...>)
|
static auto AuTupleTransformImpl(const Fn &fn, Argument &&argument, AuIndexSequence<Ns...>)
|
||||||
{
|
{
|
||||||
if constexpr (sizeof...(Ns) == 0)
|
if constexpr (sizeof...(Ns) == 0)
|
||||||
@ -171,7 +171,7 @@ namespace __audetail
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Invokable, typename... Ts>
|
template <class Invokable, class... Ts>
|
||||||
static auto AuTupleTransform(const AuTuple<Ts...> &tuple, const Invokable &translate)
|
static auto AuTupleTransform(const AuTuple<Ts...> &tuple, const Invokable &translate)
|
||||||
{
|
{
|
||||||
return __audetail::AuTupleTransformImpl(translate,
|
return __audetail::AuTupleTransformImpl(translate,
|
||||||
|
Loading…
Reference in New Issue
Block a user