summaryrefslogtreecommitdiff
path: root/AK/RefPtr.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-02-11 06:37:21 -0500
committerTim Flynn <trflynn89@pm.me>2023-02-11 08:53:00 -0500
commit0c4bbf5be33546fb43a52c41359dc8064a195374 (patch)
tree62c967af14c430caaef0a5a3a46adea2ea94cf6c /AK/RefPtr.h
parent3c842d9d761ea04c9175668699e1a3aa4fced0ce (diff)
downloadserenity-0c4bbf5be33546fb43a52c41359dc8064a195374.zip
AK: Move try_make_ref_counted() to NonnullRefPtr.h
Diffstat (limited to 'AK/RefPtr.h')
-rw-r--r--AK/RefPtr.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/AK/RefPtr.h b/AK/RefPtr.h
index 528cf7c38c..1c28a07d9a 100644
--- a/AK/RefPtr.h
+++ b/AK/RefPtr.h
@@ -328,24 +328,10 @@ inline RefPtr<T> adopt_ref_if_nonnull(T* object)
return {};
}
-template<typename T, class... Args>
-requires(IsConstructible<T, Args...>) inline ErrorOr<NonnullRefPtr<T>> try_make_ref_counted(Args&&... args)
-{
- return adopt_nonnull_ref_or_enomem(new (nothrow) T(forward<Args>(args)...));
-}
-
-// FIXME: Remove once P0960R3 is available in Clang.
-template<typename T, class... Args>
-inline ErrorOr<NonnullRefPtr<T>> try_make_ref_counted(Args&&... args)
-{
- return adopt_nonnull_ref_or_enomem(new (nothrow) T { forward<Args>(args)... });
-}
-
}
#if USING_AK_GLOBALLY
using AK::adopt_ref_if_nonnull;
using AK::RefPtr;
using AK::static_ptr_cast;
-using AK::try_make_ref_counted;
#endif