AK: Add helper to test for pointer and cv-pointer at the same time

This commit is contained in:
Hendiadyoin1 2021-11-08 15:02:04 +01:00 committed by Ali Mohammad Pur
parent dfe2cf3a40
commit ceb0e28ea5
Notes: sideshowbarker 2024-07-17 22:47:04 +09:00

View file

@ -573,6 +573,8 @@ struct __decay<T[N]> {
template<typename T> template<typename T>
using Decay = typename __decay<T>::type; using Decay = typename __decay<T>::type;
template<typename T, typename U>
inline constexpr bool IsPointerOfType = IsPointer<Decay<U>>&& IsSame<T, RemoveCV<RemovePointer<Decay<U>>>>;
} }
using AK::Detail::AddConst; using AK::Detail::AddConst;
using AK::Detail::AddLvalueReference; using AK::Detail::AddLvalueReference;