mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +00:00
Everywhere: Switch from EnableIf to requires
C++20 provides the `requires` clause which simplifies the ability to limit overload resolution. Prefer it over `EnableIf` With all uses of `EnableIf` being removed, also remove the implementation so future devs are not tempted.
This commit is contained in:
parent
8f7219c6fa
commit
2844f7c333
9 changed files with 63 additions and 73 deletions
|
@ -32,8 +32,9 @@ class WeakLink : public RefCounted<WeakLink> {
|
|||
friend class WeakPtr;
|
||||
|
||||
public:
|
||||
template<typename T, typename PtrTraits = RefPtrTraits<T>, typename EnableIf<IsBaseOf<RefCountedBase, T>>::Type* = nullptr>
|
||||
template<typename T, typename PtrTraits = RefPtrTraits<T>>
|
||||
RefPtr<T, PtrTraits> strong_ref() const
|
||||
requires(IsBaseOf<RefCountedBase, T>)
|
||||
{
|
||||
RefPtr<T, PtrTraits> ref;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue