diff --git a/Plugins/UE5Coro/Source/UE5Coro/Private/Coroutine.cpp b/Plugins/UE5Coro/Source/UE5Coro/Private/Coroutine.cpp index fcfa26c..e8958f7 100644 --- a/Plugins/UE5Coro/Source/UE5Coro/Private/Coroutine.cpp +++ b/Plugins/UE5Coro/Source/UE5Coro/Private/Coroutine.cpp @@ -81,7 +81,11 @@ bool TCoroutine<>::operator==(const TCoroutine<>& Other) const noexcept auto TCoroutine<>::operator<=>(const TCoroutine<>& Other) const noexcept -> std::strong_ordering { +#if UE5CORO_PRIVATE_LIBCPP_IS_BROKEN + return Extras.get() <=> Other.Extras.get(); +#else return Extras <=> Other.Extras; +#endif } #else bool TCoroutine<>::operator!=(const TCoroutine<>& Other) const noexcept diff --git a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Coroutine.h b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Coroutine.h index f7d2357..f0185fe 100644 --- a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Coroutine.h +++ b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Coroutine.h @@ -187,7 +187,7 @@ class TCoroutine : public TCoroutine<> }; static_assert(sizeof(TCoroutine) == sizeof(TCoroutine<>)); -#if UE5CORO_CPP20 +#if UE5CORO_CPP20 && !UE5CORO_PRIVATE_LIBCPP_IS_BROKEN static_assert(std::totally_ordered>); static_assert(std::totally_ordered_with, TCoroutine>); #endif diff --git a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Definitions.h b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Definitions.h index 44a6aee..f29fcf8 100644 --- a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Definitions.h +++ b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/Definitions.h @@ -47,6 +47,9 @@ namespace UE5Coro::Private { namespace stdcoro = ::std::experimental; } +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wdeprecated-experimental-coroutine" +#endif #else #error UE5Coro requires C++20 or the Coroutines TS for C++17. #endif @@ -54,3 +57,9 @@ namespace UE5Coro::Private #ifndef UE5CORO_DEBUG #define UE5CORO_DEBUG (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT) #endif + +#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 16000 +#define UE5CORO_PRIVATE_LIBCPP_IS_BROKEN 1 +#else +#define UE5CORO_PRIVATE_LIBCPP_IS_BROKEN 0 +#endif diff --git a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentAwaiters.h b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentAwaiters.h index ddfa4c6..8e046d9 100644 --- a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentAwaiters.h +++ b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentAwaiters.h @@ -124,7 +124,7 @@ UE5CORO_API Private::FLatentAwaiter UntilAudioTime(double); #pragma region Chain -#if UE5CORO_CPP20 +#if UE5CORO_CPP20 && !UE5CORO_PRIVATE_LIBCPP_IS_BROKEN /** Resumes the coroutine once the chained static latent action has finished, * with automatic parameter matching.
* The result of the co_await expression is true if the chained latent action diff --git a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentChain.inl b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentChain.inl index 6d59500..e3d21ab 100644 --- a/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentChain.inl +++ b/Plugins/UE5Coro/Source/UE5Coro/Public/UE5Coro/LatentChain.inl @@ -55,7 +55,7 @@ public: static_assert(sizeof(FLatentAwaiter) == sizeof(FLatentChainAwaiter)); -#if UE5CORO_CPP20 +#if UE5CORO_CPP20 && !UE5CORO_PRIVATE_LIBCPP_IS_BROKEN template concept TWorldContext = std::same_as, UObject*> || std::same_as, const UObject*> || @@ -134,7 +134,7 @@ struct FLatentChain namespace UE5Coro::Latent { -#if UE5CORO_CPP20 +#if UE5CORO_CPP20 && !UE5CORO_PRIVATE_LIBCPP_IS_BROKEN #if defined(_MSC_VER) && _MSC_VER < 1930 #define UE5CORO_PRIVATE_LATENT_CHAIN_IS_OK 0 diff --git a/Plugins/UE5Coro/UE5Coro.uplugin b/Plugins/UE5Coro/UE5Coro.uplugin index f501c1b..f4b8a11 100644 --- a/Plugins/UE5Coro/UE5Coro.uplugin +++ b/Plugins/UE5Coro/UE5Coro.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "1.9", + "VersionName": "1.10", "FriendlyName": "UE5Coro", "Description": "C++17/20 coroutine implementation for Unreal Engine", "Category": "Programming", diff --git a/Plugins/UE5CoroGAS/UE5CoroGAS.uplugin b/Plugins/UE5CoroGAS/UE5CoroGAS.uplugin index 09c1173..6dcf6c7 100644 --- a/Plugins/UE5CoroGAS/UE5CoroGAS.uplugin +++ b/Plugins/UE5CoroGAS/UE5CoroGAS.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "0.9", + "VersionName": "0.10", "FriendlyName": "UE5Coro – Gameplay Ability System", "Description": "C++17/20 coroutines for GAS", "Category": "Programming",