diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-04-02 22:22:03 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-04-06 19:40:19 +0200 |
commit | 1ccc48f42c3229a82b5b18aa682f8bf5309c90d3 (patch) | |
tree | be518e1151a7bc09fe56c4ddc5ad43b351605148 /src/common/Utilities/Concepts.h | |
parent | 5a8b91ab00c0fc2548d853d697ad6e8a5f3b8188 (diff) |
Core/Misc: Simplify Trinity::invocable_r concept
(cherry picked from commit b267129ae023bbf724a26127107777e8507743a9)
Diffstat (limited to 'src/common/Utilities/Concepts.h')
-rw-r--r-- | src/common/Utilities/Concepts.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/common/Utilities/Concepts.h b/src/common/Utilities/Concepts.h index 4cfa52c029c..3f52c6613ca 100644 --- a/src/common/Utilities/Concepts.h +++ b/src/common/Utilities/Concepts.h @@ -19,15 +19,11 @@ #define TRINITYCORE_CONCEPTS_H #include <concepts> -#include <functional> // std::invoke namespace Trinity { template <typename Callable, typename R, typename... Args> -concept invocable_r = requires(Callable && callable, Args&&... args) -{ - { std::invoke(static_cast<Callable&&>(callable), static_cast<Args&&>(args)...) } -> std::convertible_to<R>; -}; +concept invocable_r = std::is_invocable_r_v<R, Callable, Args...>; } #endif // TRINITYCORE_CONCEPTS_H |