mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
AK: Fix naming conflict with compiler builtin
Clang patch D116203 added various builtin functions for type traits, `__decay` being one of them. This name conflicts with our `AK::Detail::__decay`, leading to compiler warnings with Clang 16.
This commit is contained in:
parent
41a8f3f40f
commit
01c2cffcca
1 changed files with 4 additions and 4 deletions
|
@ -567,20 +567,20 @@ template<template<typename...> typename U, typename... Us>
|
||||||
inline constexpr bool IsSpecializationOf<U<Us...>, U> = true;
|
inline constexpr bool IsSpecializationOf<U<Us...>, U> = true;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct __decay {
|
struct __Decay {
|
||||||
typedef Detail::RemoveCVReference<T> type;
|
typedef Detail::RemoveCVReference<T> type;
|
||||||
};
|
};
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct __decay<T[]> {
|
struct __Decay<T[]> {
|
||||||
typedef T* type;
|
typedef T* type;
|
||||||
};
|
};
|
||||||
template<typename T, decltype(sizeof(T)) N>
|
template<typename T, decltype(sizeof(T)) N>
|
||||||
struct __decay<T[N]> {
|
struct __Decay<T[N]> {
|
||||||
typedef T* type;
|
typedef T* type;
|
||||||
};
|
};
|
||||||
// FIXME: Function decay
|
// FIXME: Function decay
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using Decay = typename __decay<T>::type;
|
using Decay = typename __Decay<T>::type;
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
inline constexpr bool IsPointerOfType = IsPointer<Decay<U>>&& IsSame<T, RemoveCV<RemovePointer<Decay<U>>>>;
|
inline constexpr bool IsPointerOfType = IsPointer<Decay<U>>&& IsSame<T, RemoveCV<RemovePointer<Decay<U>>>>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue