Procházet zdrojové kódy

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

Hendiadyoin1 před 3 roky
rodič
revize
ceb0e28ea5
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      AK/StdLibExtraDetails.h

+ 2 - 0
AK/StdLibExtraDetails.h

@@ -573,6 +573,8 @@ struct __decay<T[N]> {
 template<typename T>
 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::AddLvalueReference;