mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
AK: Remove clang-specific templates
This commit is contained in:
parent
fcf6cc27f2
commit
ff7cca38bd
Notes:
github-actions[bot]
2024-12-12 22:13:25 +00:00
Author: https://github.com/shlyakpavel Commit: https://github.com/LadybirdBrowser/ladybird/commit/ff7cca38bd2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2526 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/DanShaders ✅
2 changed files with 0 additions and 37 deletions
|
@ -148,15 +148,6 @@ requires(IsConstructible<T, Args...>) inline NonnullOwnPtr<T> make(Args&&... arg
|
|||
return NonnullOwnPtr<T>(NonnullOwnPtr<T>::Adopt, *new T(forward<Args>(args)...));
|
||||
}
|
||||
|
||||
#ifdef AK_COMPILER_APPLE_CLANG
|
||||
// FIXME: Remove once P0960R3 is available in Apple Clang.
|
||||
template<class T, class... Args>
|
||||
inline NonnullOwnPtr<T> make(Args&&... args)
|
||||
{
|
||||
return NonnullOwnPtr<T>(NonnullOwnPtr<T>::Adopt, *new T { forward<Args>(args)... });
|
||||
}
|
||||
#endif
|
||||
|
||||
// Use like `adopt_nonnull_own_or_enomem(new (nothrow) T(args...))`.
|
||||
template<typename T>
|
||||
inline ErrorOr<NonnullOwnPtr<T>> adopt_nonnull_own_or_enomem(T* object)
|
||||
|
@ -172,16 +163,6 @@ requires(IsConstructible<T, Args...>) inline ErrorOr<NonnullOwnPtr<T>> try_make(
|
|||
return adopt_nonnull_own_or_enomem(new (nothrow) T(forward<Args>(args)...));
|
||||
}
|
||||
|
||||
#ifdef AK_COMPILER_APPLE_CLANG
|
||||
// FIXME: Remove once P0960R3 is available in Apple Clang.
|
||||
template<typename T, class... Args>
|
||||
inline ErrorOr<NonnullOwnPtr<T>> try_make(Args&&... args)
|
||||
|
||||
{
|
||||
return adopt_nonnull_own_or_enomem(new (nothrow) T { forward<Args>(args)... });
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
struct Traits<NonnullOwnPtr<T>> : public DefaultTraits<NonnullOwnPtr<T>> {
|
||||
using PeekType = T*;
|
||||
|
|
|
@ -240,15 +240,6 @@ requires(IsConstructible<T, Args...>) inline ErrorOr<NonnullRefPtr<T>> try_make_
|
|||
return adopt_nonnull_ref_or_enomem(new (nothrow) T(forward<Args>(args)...));
|
||||
}
|
||||
|
||||
#ifdef AK_COMPILER_APPLE_CLANG
|
||||
// FIXME: Remove once P0960R3 is available in Apple 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)... });
|
||||
}
|
||||
#endif
|
||||
|
||||
template<Formattable T>
|
||||
struct Formatter<NonnullRefPtr<T>> : Formatter<T> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, NonnullRefPtr<T> const& value)
|
||||
|
@ -279,15 +270,6 @@ requires(IsConstructible<T, Args...>) inline NonnullRefPtr<T> make_ref_counted(A
|
|||
return NonnullRefPtr<T>(NonnullRefPtr<T>::Adopt, *new T(forward<Args>(args)...));
|
||||
}
|
||||
|
||||
#ifdef AK_COMPILER_APPLE_CLANG
|
||||
// FIXME: Remove once P0960R3 is available in Apple Clang.
|
||||
template<typename T, class... Args>
|
||||
inline NonnullRefPtr<T> make_ref_counted(Args&&... args)
|
||||
{
|
||||
return NonnullRefPtr<T>(NonnullRefPtr<T>::Adopt, *new T { forward<Args>(args)... });
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
struct Traits<NonnullRefPtr<T>> : public DefaultTraits<NonnullRefPtr<T>> {
|
||||
using PeekType = T*;
|
||||
|
|
Loading…
Reference in a new issue